@echo off

set SCRIPT="rocrail_temp_file.vbs"

echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%

echo sTargetPath = "%cd%\bin\rocview.exe" >> %SCRIPT%
echo sArguments = "-sp ""%cd%\bin"" -dp ""%cd%\demo""" >> %SCRIPT%
echo sWorkingDirectory = "%cd%" >> %SCRIPT%

echo desktop = oWS.SpecialFolders("Desktop") >> %SCRIPT%

echo Set oLink1 = oWS.CreateShortcut(desktop + "\Rocview.lnk") >> %SCRIPT%
echo oLink1.TargetPath = sTargetPath >> %SCRIPT%
echo oLink1.Arguments = sArguments >> %SCRIPT%
echo oLink1.WorkingDirectory = sWorkingDirectory >> %SCRIPT%
echo oLink1.Save >> %SCRIPT%

echo Set oLink2 = oWS.CreateShortcut("Rocview.lnk") >> %SCRIPT%
echo oLink2.TargetPath = sTargetPath >> %SCRIPT%
echo oLink2.Arguments = sArguments >> %SCRIPT%
echo oLink2.WorkingDirectory = sWorkingDirectory >> %SCRIPT%
echo oLink2.Save >> %SCRIPT%

cscript /nologo %SCRIPT%
del %SCRIPT%

