Jump to content

WPI and Batch files


Recommended Posts


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 desktop

copy ip_address.bat "C:\Documents and Settings\All Users\Desktop"

Link to comment
Share on other sites

Exactly what I was suspecting.

A friend of mine asked the same thing yesterday :lol:

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 by sadicq
Link to comment
Share on other sites

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

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

Yes ok , but how would my cmd look like ?

if i want to run a cmd

You mean the install switches for the KB****** ?

Look her for a tutorial How to set up the cmd for installing hotfixes

Make 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\Office

And 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 @ /hid
start /wait %systemdrive%\install\hotfixes\Q817787.EXE /Q:A /R:N
start /wait %systemdrive%\install\hotfixes\ENG_Q832483_MDAC_X86.EXE /C:"dahotfix.exe /q /n" /q
start /wait %systemdrive%\install\hotfixes\Q817778.exe /Q /O /N /Z
start /wait %systemdrive%\install\hotfixes\KB824146.exe /Q /O /N /Z
EXIT

The 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 by Pliek
Link to comment
Share on other sites

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" /f
REG ADD %KEY%\135 /V 1 /D "%CDROM%\Software\Office2003\SETUP.EXE TRANSFORMS=Unattended.MST /qn" /f
REG ADD %KEY%\135 /V 2 /D "%CDROM%\Software\Office2003\updates\EXCELff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 3 /D "%CDROM%\Software\Office2003\updates\GPFILTff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 4 /D "%CDROM%\Software\Office2003\updates\MSGRNL32ff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 5 /D "%CDROM%\Software\Office2003\updates\MSO.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 6 /D "%CDROM%\Software\Office2003\updates\MSSP3NLff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 7 /D "%CDROM%\Software\Office2003\updates\MSTH3NLff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 8 /D "%CDROM%\Software\Office2003\updates\OLKINTLff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 9 /D "%CDROM%\Software\Office2003\updates\OUTLFLTR.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 10 /D "%CDROM%\Software\Office2003\updates\OUTLOOKff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 11 /D "%CDROM%\Software\Office2003\updates\POWERPNTff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 12 /D "%CDROM%\Software\Office2003\updates\PVMSO.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 13 /D "%CDROM%\Software\Office2003\updates\SPECIALDICTIONARYNLDff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 14 /D "%CDROM%\Software\Office2003\updates\WINWORDff.msp /quiet /norestart" /f
REG ADD %KEY%\135 /V 15 /D "%CDROM%\Software\Office2003\updates\INFOPATH.msp /quiet /norestart" /f

This 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 off

FOR %%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 @ /hid
start /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 by muiz
Link to comment
Share on other sites

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 by zorphnog
Link to comment
Share on other sites

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

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