Short answer (based on complexity) you can't. Why not use tried and true methods such as OSQL i.e (inside a BAT file)
SET ChangeRecord=ABC123
SET LOGDIR="C:\Temp\%ChangeRecord%"
IF NOT EXIST %LOGDIR% MKDIR %LOGDIR%
SET LOG=%LOGDIR%\ProdInstall_%ChangeRecord%_runsql.log
SET PREFIX=%LOGDIR%\prd.
SET SRVNAME=YourServerNameHere
SET DB=YourDBNameHere
ECHO. > %LOG%
osql -S%SRVNAME% -E -n -d%DB% -i "C:\Temp\PROD\Database\Stored Procedures\SPNAMEHERE.sql" -o %PREFIX%SPNAMEHERE.sql.err >> %LOG%
OR a 3rd party (CHEAP) tool like SQL Compare by Red Gate???
Good Hunting!
AJ Ahrens
webmaster@kritter.net