Jump to content

New batch file install


Recommended Posts

I have been writing a few new scripts that puts on all of the updates from windows update. (Sorry about the long post.)

I was wondering if I could get some feed back on it.

Please see image1 for a list of folders.


Basically the 2 scripts are in their folders (e.g. cd_critical.bat is in the critical folder and cd_recommended.bat is in the recommended folder) and I have one script (see below) that calls the cd_recommended as this installs programs that are updated in the cd_critical.bat.

call .\recommended\cd_recommended.bat

call .\critical\cd_critical.bat

shutdown -r -t 10 -c "Restarting after installing the updates. THIS IS PART OF THE SCRIPT AND NOT A VIRUS."

This is the cd_recommended.bat file contents.

set PATHTOFIXES=.\recommended

%PATHTOFIXES%\dotnetfx.exe /Q:A /R:N
%PATHTOFIXES%\Journal\Journal.msi /QB
%PATHTOFIXES%\dx90wu.exe /Q
%PATHTOFIXES%\hu1002_pro.exe /Q:A /R:N
%PATHTOFIXES%\q818529.exe /Q:A /R:N
%PATHTOFIXES%\WindowsXP-KB817778-x86-ENU.exe /Z /Q
%PATHTOFIXES%\Movie_Maker_v2_XP_setup.exe /Q:A /R:N

The only things wrong this batch file is:

How to I get dotnetfx.exe to be completely unattended as I have to tell the installer to carry on by clicking next a few times.

I would like to add the echo commands in but not sure how to use them.

The dx90wu.exe goes to the internet to download the directx 9.0b then installs and the rest of the batch file continues.

Here is the cd_critical.bat file

set PATHTOFIXES=.\critical

%PATHTOFIXES%\Q322011_WXP.exe /Z /Q
%PATHTOFIXES%\Q323255_X86_EN.exe /Z /Q
%PATHTOFIXES%\Q327979_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q328310_WXP_SP2_en.exe /Z /Q
%PATHTOFIXES%\Q329048_xp.exe /Z /Q
%PATHTOFIXES%\Q329115_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q329170_WXP_SP2_EN.exe /Z /Q
%PATHTOFIXES%\Q329390_WXP.exe /Z /Q
%PATHTOFIXES%\Q329441_WXP_SP2_en.exe /Z /Q
%PATHTOFIXES%\Q329834_WXP_SP2_x86.exe /Z /Q
%PATHTOFIXES%\Q331953_WXP_en.exe /Z /Q
%PATHTOFIXES%\Q810243_WXP_SP2.exe /Z /Q
%PATHTOFIXES%\Q810565_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q810577_WXP_en.exe /Z /Q
%PATHTOFIXES%\Q810833_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q811493_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q811630_WXP_SP2_EN.exe /Z /Q
%PATHTOFIXES%\Q814033_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q814995_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q815021_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q815485_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\Q817606_WXP_SP2_x86_ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB282010-x86-ENU-express.EXE /Z /Q
%PATHTOFIXES%\WindowsXP-KB820291-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB821253-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB821557-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB823559-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB823980-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB824105-x86-ENU.exe /Z /Q
%PATHTOFIXES%\WindowsXP-KB824146-x86-ENU-express /Z /Q
%PATHTOFIXES%\Q823718_MDAC_SecurityPatch.exe /C:"dahotfix.exe /q /n" /q
%PATHTOFIXES%\q822925.exe /Q:A /R:N
%PATHTOFIXES%\js56nen.exe /Q:A /R:N
%PATHTOFIXES%\msjavwu.exe /Q:A /R:N
%PATHTOFIXES%\q330994.exe /Q:A /R:N
%PATHTOFIXES%\WindowsMedia9-KB819639-x86-ENU.exe /Q:A /R:N

This file works without any problems, but I wouldn’t mind putting the echo commands in to say what is being installed.

And the final part of the batch files restarts it after 10 seconds with that message in the message window.

The main reason for this post is too see if I can get these to install in the winnt.sif under the [GuiRunOnce] part using the batch file that calls the 2 files then restarts (if I need to change the restart time that easy).

These files how they are can be installed from any drive letter on their own but I don‘t know about the winnt.sif so know if these commands will work using the set command?

I was hoping not to use put the critical and recommended folders into the $OEM$ folder just in a folder called hotfixes. Like this:


--> DOCS

--> Hotfixes (my folder)

--> Critical

--> Recommended

--> I386



If this all works then it only adds 99mbs to the total of a CD but doesn’t include a full install of directx 9.0b (yet)

Thanks for all your help.

Link to comment
Share on other sites


start /wait %systemdrive%\install\NetFramework\netfx.msi /QB

my hotfix install:

echo Installing MS Hotfixes....This might take awhile...
start /wait %systemdrive%\install\hotfix\js56nen.exe /Q:A /R:N
start /wait %systemdrive%\install\hotfix\Q323255.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q328310.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329048.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329115.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329170.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329390.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329441.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q329834.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\q330994.exe /Q:A /R:N
start /wait %systemdrive%\install\hotfix\Q331953.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q810565.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q810577.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q810833.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q811493.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q811630.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q817287.EXE /Q:A /R:N
start /wait %systemdrive%\install\hotfix\Q817606.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\q822925.EXE /Q:A /R:N
start /wait %systemdrive%\install\hotfix\KB819639.exe /Q:A /R:N
start /wait %systemdrive%\install\hotfix\KB821557.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\KB823559.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q814033.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q815021.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\Q823718.exe /C:"dahotfix.exe /q /n" /q
start /wait %systemdrive%\install\hotfix\KB824105.exe /Q /M /Z
start /wait %systemdrive%\install\hotfix\KB824146.exe /Q /M /Z

Link to comment
Share on other sites


when I add

set PATHTOFIXES=.\recommended

%PATHTOFIXES%\dotnetfx\netfx.msi /QB

to my cd_recommended.bat file it asks for me to insert the disk containing the microsoft .net framework 1.1

all of the files are extracted in a folder call dotnetfx in the recommended folder.

and the rest of the scprit works if i tell it to use the dotnetfx.exe instead of the .msi file but it doesn't work to unattended mode.

Would i need to do something like what you have done for Q823718.exe, get it to extract to a folder then run the netfx.msi /QB?

One thing to note is that this works fine for installing the journal viewer

%PATHTOFIXES%\Journal\Journal.msi /QB

this is the second line in the file and this installs fine. This is in the recommended folder with a sub folder call journal.

Edited by gareththegod
Link to comment
Share on other sites

It is still refered to as "BATCH SCRIPTING" thus .bat is not technically incorrect. Files with .cmd are concidered "Windows NT Command Scripts" and basically do the same thing. Granted Windows XP sees them as "MS-DOS batch scripts" it does not make them obsolete. You can name them .cmd all day long but they will still be refered to as batch scripts.

Link to comment
Share on other sites

I think we all got side-tracked, and nobody really expected .bat to .cmd to change anything...

You originally had 3 Questions / Problems:

1) .Net did not install silently.

2) DX phoned home to get additional files.

3) You would like more "ECHO"s.

The third question is simple, and you have an example in the first reply: add "ECHO Your message here" lines between the existing lines with a meaningful message.

The second question: you should have the full install of DX, not the web install. I believe Aaron said it is available on the site to download, but you best hurry... That with the proper switches should cover this point.

The first question: Again, it must be a question of having the right .exe file, and calling it with the right switches. I use

START "Dot Net" /WAIT ".\SVCPACK\dotnetfx.exe" /Q:A /c:"install /q"

You do not ... It is an installer in an installer, that is why you need two "silent" switches. The "C" switch is often used for passing command line parameters to the second executable file.

As for your proposed CD layout: I would think that you can put a directory anywhere on your CD, and access it with relative paths. I put mine in $OEM$, and I do not see any disadvantage: I do not copy the files to the HDD, and I am already there when setup passes me control. Performance wise, there is no penalty. Esthetically, that's your call.

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