Incorrect syntax in adventure works install script via SMSS Im trying to install a sample DB by script. Ive tried with pubs, northwind and now adventureworks. I get a lot of errors. Im posting here because i believe im doing something wrong. Im assuming the install script for adventureworks is properly scripted still i get lots of error messages like 

&gt; Msg 102, Level 15, State 1, Line 39
Incorrect syntax near ':'.

Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64) 
    Aug 22 2017 17:04:49 
    Copyright (C) 2017 Microsoft Corporation
    Developer Edition (64-bit) on Windows 10 Home 10.0 &lt;X64&gt; (Build 17134: )


Started - 2018-07-07 15:15:49.647

*** Dropping Database
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '$'.

*** Creating Database
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '$'.
It looks like you are running the script from an SSMS window and it contains SQLCMD variables. Enable SQLCMD mode from the Query menu (Query-->SQLCMD Mode). Be sure the SQLCMD variable values are set as desired before running the script.