Mart
(KiX Supporter)
2003-07-11 10:48 AM
Win2k SP4 install

We are planning to upgrade all our workstations to sp4 for Win2k. Below a little script for anyone who is interested.

Servicepack should be unpacked first.

Options for silent, unattended, etc...
-u = unattended mode
-f = force other applications to close when system shuts down after install
-n = do not backup file for un-installation
-o = overwrite OEM file without prompting
-z = do not restart when install is complete
-q = quit mode (no user interaction)
-l = list installed hot fixes
-s:dir = integrate service pack files into dir
-d:dir = backup files onto dir

Options can be ussed with this part of the script.
code:
Shell '\\servername\sharename\i386\update\update.exe'

Full script.
code:
;===============================================================================================
;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 11-07-2003 at 9:14:02 ****
;===============================================================================================
$CSD = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CSDVersion")
;
If ($CSD = 'Service Pack 1')
Goto sp4installyes
EndIf
;
If ($CSD = 'Service Pack 2')
Goto sp4installyes
EndIf
;
If ($CSD = 'Service Pack 3')
Goto sp4installyes
EndIf
;
If ($CSD = 'Service Pack 4')
Goto sp4installno
EndIf
;
If ($CSD = '')
MessageBox('Unable to determine current servicepack version.' + Chr(13) + Chr(10) + 'Installation will not continue.', 'Windows 2000 SP4 installation', 16)
Goto end
EndIf
;
:sp4installyes
$sp4install = MessageBox('Windows 2000 Servicepack 4 will be installed.' + Chr(13) + Chr(10) + 'Continue?', 'Windows 2000 SP4 installation', 36)
If ($sp4install = '6')
?'Installing Windows 2000 Servicepack 4, please wait.....'
?''
?'System will automatically reboot when installation is finished.'
Shell '\\servername\sharename\i386\update\update.exe'
Else
MessageBox('Windows 2000 Servicepack 4 installation canceled.', 'Windows 2000 SP4 installation', 48)
Goto end
EndIf
;
:sp4installno
MessageBox('Windows 2000 Servicepack 4 is currently installed.' + Chr(13) + Chr(10) + 'Installation will not continue.', 'Windows 2000 SP4 installation', 16)
;
:end



[ 11. July 2003, 10:49: Message edited by: R2D2 ]


LonkeroAdministrator
(KiX Master Guru)
2003-07-11 11:03 AM
Re: Win2k SP4 install

not doing a quiet install?

Mart
(KiX Supporter)
2003-07-11 11:40 AM
Re: Win2k SP4 install

I'm doing a silent install with the -f, -n, -o and -q options. Never underestimate the stupidity of a user, so our workstations are updated without any user input. [Razz]
Same goes for the Acrobat 6 update we are doing. Script available here.

This is just the basic script with no options set so anyone can choose it’s own settings.


LonkeroAdministrator
(KiX Master Guru)
2003-07-11 11:52 AM
Re: Win2k SP4 install

you are?
so why this script is full of output?
and it even asks the user if he is willing to do it [Big Grin]


Radimus
(KiX Supporter)
2003-07-12 12:10 AM
Re: Win2k SP4 install

you may want to extract the files to the client machine (c:\winnt\sp4) and have it run the update.exe from their PC.

win2ksp4_en.exe -u -x:%windir\sp4
%windir\sp4\i386\update\update.exe -f -n -o -q

If there is a case of installing a new device or software option, and the system wants the sp4 files you will be SOL without it.


Mart
(KiX Supporter)
2003-07-12 12:11 AM
Re: Win2k SP4 install

Ok, ok Lonkero your right. But this is just for testing if it works. All message boxes and stuff can be removed for an actual silent install. Leaving the

code:
?'Installing Windows 2000 Servicepack 4, please wait.....'
?''
?'System will automatically reboot when installation is finished.'

in might be handy so users know what is happening before calling the helpdesk with the "Some stupid window is open on my computer please get your f@#&^%% hands out of my computer" question. [Big Grin]

Like I said this is the basic script, feel free to customize it to your needs.

[ 11. July 2003, 12:13: Message edited by: R2D2 ]


LonkeroAdministrator
(KiX Master Guru)
2003-07-12 12:13 AM
Re: Win2k SP4 install

what window?
if you run silent install, what is the window you then have?


Radimus
(KiX Supporter)
2003-07-12 12:15 AM
Re: Win2k SP4 install

beyond that... you should replace all those if statements with a select/case structure instead.

then replace the select/case with:
if $csd and right($csd,1)<'4'
do install
endif


Mart
(KiX Supporter)
2003-07-12 12:17 AM
Re: Win2k SP4 install

As far as I know a command prompt is always open when you run a kix script.

Maybe with MS SMS or something it can be forced to run in the background so there will be no screen output at all.


LonkeroAdministrator
(KiX Master Guru)
2003-07-12 12:28 AM
Re: Win2k SP4 install

oh, you are one of those that do not know! [Big Grin]

wkix32.exe (renamed after some beta state of 4.00) is fully windowless.
the name was changed to wkix32 to keep the kix32 same as the old 3.xx style.

anyway, it creates window only if you output something to the console-screen.
and that is why I have been using it for my logonscripts for about 1,5 years [Big Grin]


Sealeopard
(KiX Master)
2003-07-11 03:13 PM
Re: Win2k SP4 install

I would also not run it while users are logged into the computer. Rather schedule a silent install from an administrative computer via Task Scheduler at night and have the computer reboot automatically. Additionally, the service pack install has to run under amdin privileges anyway, and when using the Task Scheduler as potentially logged-in user would not see the install anyway as a different account is being used.

NTDOCAdministrator
(KiX Master)
2003-07-12 12:41 AM
Re: Win2k SP4 install

Well we don't have our machines running like Jens and we do perform rollouts during LOGON.

Our users typically are Administrators on their local system.

R2D2
Take a look at this script and see if there is anything you might want to use in yours or see what you might have forgotten to check.

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=004424