October 17, 200817 yr I'm really new to WPI but I think it's a great tool. I'm a computer tech for several elementary schools and i've found it useful for adding all the software I need in one location with minimal time. My issue now is running a batch file to install Office 07 with a switch for our .msp file. my WPI Command 1 looks like this "%wpipath%\Install\Office_2007_Install\setup.cmd" My batch file contains this code setup.exe /adminfile MPS.msp. When WPI runs, it tells me i need to use the control panel to install and configure system components. I've read several different things on batch files within the forum but they don't seem to be using a simliar situation.Is there a tool or something I need to use with WPI or a code I need to add into the command? Any help for this newb would be greatly appreciated. Edited October 17, 200817 yr by Cromag
October 19, 200817 yr The problem is that you call "C:\WINDOWS\system32\setup.exe" instead of "%wpipath%\Install\Office_2007_Install\setup.exe"Just modify your script like this:PUSHD "%~dp0"setup.exe /adminfile MPS.mspPOPD%0 ist the full path to your setup.cmd - %~dp0 is only the drive and the path to your setup.cmd.PUSHD and POPD are better CD-commands.GreetingsAl Edited October 19, 200817 yr by AlBundy33
October 20, 200817 yr Author Thanks so much! I have no idea what those commands mean but they worked so I'm happy.
October 20, 200817 yr Thanks so much! I have no idea what those commands mean but they worked so I'm happy.http://www.ss64.com/nt/pushd.htmlhttp://www.ss64.com/nt/popd.htmlYou change the current directory to the same one where the file you invoked is (%~dp0 means d=drive p=path 0=the first parameter, i.e. the running batch), then you execute the command, then you restore current directory to whatever it was previously.jaclaz
October 21, 200817 yr Hi,Just out of curiosity, why are you calling a batch file instead of call directly the setup.exe with the parameters in the Command 1 field? I'm a newbie using this tool.Greetings
October 25, 200817 yr Of course it is possible to insert this command directly into wpi - but if you use a batch file you can also install your application without to start wpi.Al
Create an account or sign in to comment