Page 1 of 1 1
Topic Options
#75802 - 2003-07-11 10:48 AM Win2k SP4 install
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4636
Loc: The Netherlands
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 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#75803 - 2003-07-11 11:03 AM Re: Win2k SP4 install
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
not doing a quiet install?
_________________________
!

download KiXnet

Top
#75804 - 2003-07-11 11:40 AM Re: Win2k SP4 install
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4636
Loc: The Netherlands
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.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#75805 - 2003-07-11 11:52 AM Re: Win2k SP4 install
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
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]
_________________________
!

download KiXnet

Top
#75806 - 2003-07-12 12:10 AM Re: Win2k SP4 install
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
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.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#75807 - 2003-07-12 12:11 AM Re: Win2k SP4 install
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4636
Loc: The Netherlands
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 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#75808 - 2003-07-12 12:13 AM Re: Win2k SP4 install
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
what window?
if you run silent install, what is the window you then have?
_________________________
!

download KiXnet

Top
#75809 - 2003-07-12 12:15 AM Re: Win2k SP4 install
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#75810 - 2003-07-12 12:17 AM Re: Win2k SP4 install
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4636
Loc: The Netherlands
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.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#75811 - 2003-07-12 12:28 AM Re: Win2k SP4 install
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
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]
_________________________
!

download KiXnet

Top
#75812 - 2003-07-11 03:13 PM Re: Win2k SP4 install
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
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.
_________________________
There are two types of vessels, submarines and targets.

Top
#75813 - 2003-07-12 12:41 AM Re: Win2k SP4 install
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11558
Loc: CA
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

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 138 anonymous users online.
Newest Members
Steff, phanhuyen, Jeroen_Ruijter, Tienn, tmvngocdung42
17545 Registered Users

Generated in 0.053 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org