i’ve written a console application deploy.exe which runs a batch script.
Process p1 = new Process(); p1.StartInfo.FileName = AppDomain.CurrentDomain.BaseDirectory + 'installer.bat'; p1.StartInfo.WindowStyle = ProcessWindowStyle.Normal; p1.Start(); p1.WaitForExit(); p1.Close();
the installer.bat conatins the following command. \shared1\lists\list1.cmd
If i run the executable byitself it runs successfully.
However i needed it to run in a windows installer project. So i made a setup and deployment project and added the deploy.exe successfully as custom action upon install.
It runs fine but when it starts to execute the command i get this error ‘The filename, directory name, or volume label syntax is incorrect’. any help?
the error seems to be inside the script which was being executed. It contained environment variables %kind%, which were not acceptable by the installer for some reason. So it was working properly outside the installer and not properly when the installer was calling it.