Bugge T. Jensen
8th January 2003 12:00 UTC
FileWrite
Hi
I want to write a bat file on my installation and have tried this
FileOpen $9 "${SOURCE}\\bin\\ssShutDown.bat" w
IfErrors 0 NoError
MessageBox MB_OK "File open error"
Goto ErrorYay
NoError:
MessageBox MB_OK "FileOpen"
>ErrorYay:
>DetailPrint $9
FileWrite$9 "C:\\SimFlex-stability\\bin\\KillApps.exe c:\\SimFlex-stability\\bin\\dssShutdown.txt"
>FileWrite $9 "C:\\Program Files\\CNS International\\The InterCom System\\Server\\ICSvrNT.exe /stop"
>FileWrite $9 "C:\\SimFlex-stability\\bin\\KillApps.exe c:\\SimFlex-stability\\bin\\dssShutdown.txt"
>FileWrite $9 "C:\\Program Files\\CNS International\\The InterCom System\\Server\\ICSvrNT.exe /start"
>FileClose $9
>
But i Allways run in to the File open error.
By the way a actualy wants to write quotes (") in the string How can i do that.
Any suggestions
Bugge T. Jensen
8th January 2003 12:07 UTC
Sorry after posting the question i found the problem is the destination was wrong i should use $INSTDIR further i guess my Iferrors i wrong. Sorry to disturb you...
But the question about quoutes is still walid ?
Joost Verburg
8th January 2003 14:12 UTC
'bla "quote" bla'
Or, if you are using the latest NSIS 2 version:
"bla $\"quote$\" bla"
Bugge T. Jensen
8th January 2003 14:46 UTC
I use 2.0b0 and had succes with first solution the second failed, anyway thanks i am back on track
Thanks
Joost Verburg
8th January 2003 14:57 UTC
Good :D What's the problem with "bla $\"quote$\" bla" ?
Bugge T. Jensen
8th January 2003 15:14 UTC
Aha! I forget the $ so probably no problem at all.
Did not try as my current solution do the job
Joost Verburg
8th January 2003 19:20 UTC
Yep :D The second solution is useful if you have multiple special characters.