gareththegod Posted September 28, 2003 Posted September 28, 2003 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.batcall .\critical\cd_critical.batshutdown -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.setlocalset 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%\MMSSETUP.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%PATHTOFIXES%\MPSetupXP.exe /Q:A /R:NThe 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 filesetlocalset 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%\Q817287.EXE /Q:A /R:N%PATHTOFIXES%\WindowsMedia9-KB819639-x86-ENU.exe /Q:A /R:NThis 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:CDROOT--> DOCS --> Hotfixes (my folder) --> Critical --> Recommended--> I386 --> SUPPORT--> VALUEADDIf 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.
edg21 Posted September 28, 2003 Posted September 28, 2003 netfx.msi:start /wait %systemdrive%\install\NetFramework\netfx.msi /QBmy hotfix install:echo Installing MS Hotfixes....This might take awhile...start /wait %systemdrive%\install\hotfix\js56nen.exe /Q:A /R:Nstart /wait %systemdrive%\install\hotfix\Q323255.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q328310.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329048.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329115.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329170.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329390.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329441.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q329834.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\q330994.exe /Q:A /R:Nstart /wait %systemdrive%\install\hotfix\Q331953.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q810565.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q810577.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q810833.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q811493.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q811630.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q817287.EXE /Q:A /R:Nstart /wait %systemdrive%\install\hotfix\Q817606.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\q822925.EXE /Q:A /R:Nstart /wait %systemdrive%\install\hotfix\KB819639.exe /Q:A /R:Nstart /wait %systemdrive%\install\hotfix\KB821557.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\KB823559.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q814033.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q815021.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\Q823718.exe /C:"dahotfix.exe /q /n" /qstart /wait %systemdrive%\install\hotfix\KB824105.exe /Q /M /Zstart /wait %systemdrive%\install\hotfix\KB824146.exe /Q /M /Z
gareththegod Posted September 29, 2003 Author Posted September 29, 2003 (edited) @edg21when I addsetlocalset PATHTOFIXES=.\recommended%PATHTOFIXES%\dotnetfx\netfx.msi /QBto my cd_recommended.bat file it asks for me to insert the disk containing the microsoft .net framework 1.1all 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 /QBthis is the second line in the file and this installs fine. This is in the recommended folder with a sub folder call journal. Edited September 29, 2003 by gareththegod
Aaron Posted September 29, 2003 Posted September 29, 2003 You can get the DirectX 9.0b silent install from the Unattended XP CD site. But we have to remove this and replace it with the OPK version soon due to EULA violations.
Mike500 Posted September 29, 2003 Posted September 29, 2003 By the way, XP has no DOS anymore. Thus, .bat is technically a wrong extension. Use .cmd instead.
gareththegod Posted September 29, 2003 Author Posted September 29, 2003 well they still work as *.bat
Mike500 Posted September 29, 2003 Posted September 29, 2003 well they still work as *.batYes, of course.. but it's a matter of principle that .cmd should be used on NT based systems.
un4given1 Posted September 29, 2003 Posted September 29, 2003 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.
Mike500 Posted September 29, 2003 Posted September 29, 2003 I agree, it's more of a philisophical question than anything else. But since the list of commands of MS-DOS vs. NT/XP are different in some respects, i think it's good to use .cmd when you write something for XP.
GreenMachine Posted September 29, 2003 Posted September 29, 2003 I don't believe everything I find on the internet, but THIS ARTICLE seemed to make sense (even to me...) I know it's a little old (NT4?), but I think it's still acurate.
gareththegod Posted September 30, 2003 Author Posted September 30, 2003 well ive changed them all to *.cmd but it still doesn't help as the file still doesn't install. thanks for the information.
GreenMachine Posted September 30, 2003 Posted September 30, 2003 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 useSTART "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.
gareththegod Posted September 30, 2003 Author Posted September 30, 2003 thanks that info was very helpful.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now