kevinbryant69 Posted November 17, 2011 Share Posted November 17, 2011 I have a lot of batch scripts that I must run repeatedly in different combinations on different OSs. I think that WPI would be a perfect tool for this. I am however having trouble getting WPI to launch batch scripts. It will launch an executable just fine but always gives an error when trying to launch a batch file. The error is not very descriptive. I have very little java/html/vbs experiance. I can poke around at the code and figure some things out, but for the most part my skills lie in batch scripting. Can anyone help me figure this out? At this moment I am testing this on windows 7 pro 32bit.thanks in advance,Kevin Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted November 17, 2011 Share Posted November 17, 2011 (edited) Please add before each commandline when selecting a command cmd /cSo your cmdline would be = cmd /c "%wpipath%\install\batch1.cmd"Also please remember WPI is not free for buisness or corporation uses. Edited November 17, 2011 by Kelsenellenelvian Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted November 17, 2011 Share Posted November 17, 2011 I have added the dos sub-command of {BATCH} to the commandwizard for the next version.Then you com lines would be - {BATCH} "%wpipath%\install\batch1.cmd" Link to comment Share on other sites More sharing options...
mritter Posted November 18, 2011 Share Posted November 18, 2011 Careful with that new command. Build it around the existing code in installer.js to handle x86 and x64 properly. I was going to do it but no key stroke savings. if (cmd.indexOf(".cmd") != -1 || cmd.indexOf(".bat") != -1) { if (cmd.indexOf(" ") != -1 && cmd.substr(0,1) != '"') cmd='"'+cmd+'"'; if (programs[item].bit64=="yes" && OSBits==64) cmd='"'+sysPath64+'cmd.exe" /C '+cmd; else cmd='"'+sysPath32+'cmd.exe" /C '+cmd; return cmd; } Link to comment Share on other sites More sharing options...
kevinbryant69 Posted November 21, 2011 Author Share Posted November 21, 2011 Thanks for the replies.How much does WPI cost for none private use?Also I am trying to add that to my command line and its not working. My command line looks like this, cmd /c "%gamesrc%\Batch files\Batch1.cmd"I changed the default path to match my environment variable of %gamesrc%. All I get is a command windows for just a split second, too fast to read and then the installer bar goes all the way to 100% then an error icon pops up on the list and it exits and restart WPI.Any more advice? Link to comment Share on other sites More sharing options...
kevinbryant69 Posted November 21, 2011 Author Share Posted November 21, 2011 I changed the network resource to a local mapped drive and that seems to take care of some issues but some scripts still do not execute properly. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted November 21, 2011 Share Posted November 21, 2011 WPI doesn't recognize enviroment variables like that.They have to be coded in. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now