Jump to content

Batch Files With WPI Problem


Recommended Posts

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. :thumbup

Edited by Cromag
Link to comment
Share on other sites


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.msp
POPD

%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.

Greetings

Al

Edited by AlBundy33
Link to comment
Share on other sites

Thanks so much! I have no idea what those commands mean but they worked so I'm happy.

http://www.ss64.com/nt/pushd.html

http://www.ss64.com/nt/popd.html

You 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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...