bbbngowc Posted September 7, 2006 Share Posted September 7, 2006 How can I use WPI to run batch files? Every time I run a batch file from WPI the check mark shows that the command executed but nothing happens. When I run the batch file directly it works, but not from WPI.Suggestions? Link to comment Share on other sites More sharing options...
sadicq Posted September 7, 2006 Share Posted September 7, 2006 (edited) Well, post your command so we can see it ... we can't read your mind Edited September 7, 2006 by sadicq Link to comment Share on other sites More sharing options...
bbbngowc Posted September 7, 2006 Author Share Posted September 7, 2006 Well, post your command so we can see it ... we can't read your mind %wpipath%\Install\test.bat Link to comment Share on other sites More sharing options...
sadicq Posted September 7, 2006 Share Posted September 7, 2006 I mean the content of it too. I have an idea, but I have to be sure, so post it.And that should be %wpipath%Install\test.bat ...Anyway, it should work with %wpipath%\ too. Link to comment Share on other sites More sharing options...
bbbngowc Posted September 7, 2006 Author Share Posted September 7, 2006 I mean the content of it too. I have an idea, but I have to be sure, so post it.And that should be %wpipath%Install\test.bat ...Anyway, it should work with %wpipath%\ too.Here's is the contents of a file that didn't work: There purpose is to copy another batch file to the desktopcopy ip_address.bat "C:\Documents and Settings\All Users\Desktop" Link to comment Share on other sites More sharing options...
sadicq Posted September 7, 2006 Share Posted September 7, 2006 (edited) Exactly what I was suspecting.A friend of mine asked the same thing yesterday Well, when wpi is run, the current dir is not the dir where the batch is run from.So it will search for ip_address.bat in the wrong dir.Here's the correct code: copy %~dp0ip_address.bat "C:\Documents and Settings\All Users\Desktop"So to fix the other ones, just put a %~dp0 in front of the files that do not have a full path. Edited September 7, 2006 by sadicq Link to comment Share on other sites More sharing options...
bbbngowc Posted September 7, 2006 Author Share Posted September 7, 2006 Thanks man! That's worked great. Link to comment Share on other sites More sharing options...
muiz Posted September 8, 2006 Share Posted September 8, 2006 So how would my command look like?Example :i want to install office updates , there are 15 or more.But the wpi allows me only 6 lines.Can i set it more lines? or do i need the cmd file? Link to comment Share on other sites More sharing options...
Pliek Posted September 8, 2006 Share Posted September 8, 2006 So how would my command look like?Example :i want to install office updates , there are 15 or more.But the wpi allows me only 6 lines.Can i set it more lines? or do i need the cmd file?I uses a cmd file to do this and for hiding I use cmdow.exe Link to comment Share on other sites More sharing options...
muiz Posted September 8, 2006 Share Posted September 8, 2006 Yes ok , but how would my cmd look like ?if i want to run a cmd Link to comment Share on other sites More sharing options...
Pliek Posted September 8, 2006 Share Posted September 8, 2006 (edited) Yes ok , but how would my cmd look like ?if i want to run a cmdYou mean the install switches for the KB****** ?Look her for a tutorial How to set up the cmd for installing hotfixesMake a self extracting SFX with winrar an name it OfficeUpdates.exe.SFX your hotfixes folder but include the OfficeUpdates.cmd and execute this after unpacking the SFX this can be done by winrar itself.Put the hotfix folder in Your WPI\Instal\Apps\OfficeAnd call it within WPI like this;cmd1[pn]=['%wpipath%WPI\Install\Office\OfficeUpdates.exe];Example: OfficeUpdates.cmd (I just copy and paste some hotfixes for example, edit it to your needs)@ECHO OFF%systemroot%\system32\cmdow.exe @ /hidstart /wait %systemdrive%\install\hotfixes\Q817787.EXE /Q:A /R:Nstart /wait %systemdrive%\install\hotfixes\ENG_Q832483_MDAC_X86.EXE /C:"dahotfix.exe /q /n" /qstart /wait %systemdrive%\install\hotfixes\Q817778.exe /Q /O /N /Zstart /wait %systemdrive%\install\hotfixes\KB824146.exe /Q /O /N /ZEXITThe path of cmdow.exe could be different in your configuration, so edit this to your path.Then with WPI execute command after you cleanup the install folder from C:\ Edited September 8, 2006 by Pliek Link to comment Share on other sites More sharing options...
muiz Posted September 8, 2006 Share Posted September 8, 2006 (edited) No i know the swiches pliek, thats not the problem.ok i give you an example:REG ADD %KEY%\135 /VE /D "Microsoft Office 2003 SP2" /fREG ADD %KEY%\135 /V 1 /D "%CDROM%\Software\Office2003\SETUP.EXE TRANSFORMS=Unattended.MST /qn" /fREG ADD %KEY%\135 /V 2 /D "%CDROM%\Software\Office2003\updates\EXCELff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 3 /D "%CDROM%\Software\Office2003\updates\GPFILTff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 4 /D "%CDROM%\Software\Office2003\updates\MSGRNL32ff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 5 /D "%CDROM%\Software\Office2003\updates\MSO.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 6 /D "%CDROM%\Software\Office2003\updates\MSSP3NLff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 7 /D "%CDROM%\Software\Office2003\updates\MSTH3NLff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 8 /D "%CDROM%\Software\Office2003\updates\OLKINTLff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 9 /D "%CDROM%\Software\Office2003\updates\OUTLFLTR.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 10 /D "%CDROM%\Software\Office2003\updates\OUTLOOKff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 11 /D "%CDROM%\Software\Office2003\updates\POWERPNTff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 12 /D "%CDROM%\Software\Office2003\updates\PVMSO.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 13 /D "%CDROM%\Software\Office2003\updates\SPECIALDICTIONARYNLDff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 14 /D "%CDROM%\Software\Office2003\updates\WINWORDff.msp /quiet /norestart" /fREG ADD %KEY%\135 /V 15 /D "%CDROM%\Software\Office2003\updates\INFOPATH.msp /quiet /norestart" /fThis is how i used to install Office and the updates.Now im using WPI and want to install the same things.But i have only 6 lines , but these are more then 6.So if i cant add more lines, i have to install with cmd.Normaly with RunOnce it starts like this :cmdow @ /HID@echo offFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:Do i still have to ad those lines?And do i still have to ad : start /wait %systemdrive%\So this would work ?@ECHO OFF%systemroot%\system32\cmdow.exe @ /hidstart /wait "%CDROM%\WPI\install\Office2003\updates\EXCELff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\GPFILTff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\MSGRNL32ff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\MSO.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\MSSP3NLff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\MSTH3NLff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\OLKINTLff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\OUTLFLTR.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\OUTLOOKff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\POWERPNTff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\PVMSO.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\SPECIALDICTIONARYNLDff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\WINWORDff.msp /quiet /norestart"start /wait "%CDROM%\WPI\install\Office2003\updates\INFOPATH.msp /quiet /norestart"EXIT Edited September 8, 2006 by muiz Link to comment Share on other sites More sharing options...
zorphnog Posted September 8, 2006 Share Posted September 8, 2006 (edited) Yeah. You still need to add those lines because %CDROM% is not a windows environment variable, and is not garaunteed to be set when you run the .cmd file.You may also want to consider separating the Office install into components (i.e. Word, Access, Excel...) and having a SP2 configuration entry for each one. That way you don't need a .cmd file and you can use the %wpipath%Install path to install. Edited September 8, 2006 by zorphnog Link to comment Share on other sites More sharing options...
Pliek Posted September 8, 2006 Share Posted September 8, 2006 Yeah. You still need to add those lines because %CDROM% is not a windows environment variable, and is not garaunteed to be set when you run the .cmd file.You may also want to consider separating the Office install into components (i.e. Word, Access, Excel...) and having a SP2 configuration entry for each one. That way you don't need a .cmd file and you can use the %wpipath%Install path to install.Very good idee zorphnog separate and then you have all the lines you need muiz.Succes Link to comment Share on other sites More sharing options...
muiz Posted September 9, 2006 Share Posted September 9, 2006 Good idea , but it works fine this way now , thx for your help 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