Running a batch file in XP during install problem
Here's a wierd one. I'm setting off a batch file in my install and it isn't working. I've put some in line debugging statements to try and determine what is going on.
Original line that is not working (the batch file does exist):
LaunchAppAndWait("INSTALLDIR ^ "local\\environment\\mkimages.bat","",WAIT)
My Debug replacement....
I've already changed to the directory where I'm running the batch, and the "dir" command verifies that. With the command window still up from the '/k' option, I do some expirementing.
I run my batch and nothing, nothing comes up. I then run it like this and it works:
cmd /c mybatch.bat
I can also run start, have it spawn what looks like the exact same command window and run my batch there and it WORKS! Why not on the first initial command window that InstallShield pops up. This only happens on XP, W2K works just fine.
Anyone have any ideas on this?
Last edited by Toddburke; 10-11-2002 at 04:35 PM.
I've sometimes hit problems like this that are nigh on un-figure-out-able..
However, I've had success in using Wscript.Shell.Run as a last resort. See MSDN for details, command-line params etc...
The script idea seemed to work, not exaclty pretty, but at least it will get me there for now. Wonder if this is a known issue with InstallShield Developer. I don't think we use to have this problem with XP before with InstallShield Profesional.
This is my test VBScript:
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("mkimages.bat", 10, true)
So now I'm running with "cmd /c CScript mytest.vbs" with 'LaunchAppAndWait'. When I ran just "CScript mytest.vbs" it would work as before. Thanks for the advise Keppler.