Page 1 of 1 1
Topic Options
#22858 - 2002-06-10 05:06 PM Need Major Help (want to install a microsoft patch)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
I am probably the most dense person on here. I was hoping someone asked the same question. I kept reading other sites, but no luck. As my name implies, I am not a network/admin guy, I am a developer trying to double as a security implementer at my humble shop.

Anyway, I am trying to autoinstall Q321232.exe in a login script. I got it to work in a normal bat file just by copying the file to the users c:\ drive and then run it Q321232.exe problem is when they reboot, it runs again.

I installed kix start on our PDC and tried taking advantage of IF NOT EXIST ("C:\Q321232.exe")
but that doesn't work. So i have some basic questions.

1) Does kix need to be installed on everyones local machine who will be logging on.

2) Does it matter what directory Kix is loaded into.

I had mybatfile.bat loaded into the user login script and the file contained the following.

C:\LocationofKix\kix32 \\Sharedfile\mykixfile.kix

mykixfile.kix contained the

if not exist ("C:\q321232.exe")
copy \\shareddirectory\q321232.exe c:\
c:\q321232.exe -u
endif

HELP!!!!!!!!!

(MCA: complete subject)

[ 17 June 2002, 05:56: Message edited by: MCA ]

Top
#22859 - 2002-06-10 05:11 PM Re: Need Major Help (want to install a microsoft patch)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Are you just using a commandline script or do you want to use kixtart? Also, what version of kixtart would you use? (you can run it from your netlogon share.) Also, what client/server OSes are you using?
---
I currently have a script that does exactly what you want for Win 9x (cuz i do the IE updates through logon script) ... but I'd have to trim it down so it would be usable for you.

Brian

Top
#22860 - 2002-06-10 05:14 PM Re: Need Major Help (want to install a microsoft patch)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Well, I was trying to use kixstart so I can use the "If exist" command function. I am new to scripting and didn't know how to check that without it. Version 4.02 PDC is NT 4.0, and our users run 2000.

Sorry for the lack of specifics in my initial message.

Top
#22861 - 2002-06-10 05:18 PM Re: Need Major Help (want to install a microsoft patch)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You can check for the presence of e.g %WINNT%\$NtUninstallQ297961$ to see whether Q297961 has been installed.
_________________________
There are two types of vessels, submarines and targets.

Top
#22862 - 2002-06-10 06:24 PM Re: Need Major Help (want to install a microsoft patch)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
True, Jens..
I have posted this before... I use the registry keys under active setup for this:

code:
$IEVersion = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer","Version")
If $IEVersion <= 5.50.0
$Selection = Messagebox("Your current version of Internet Explorer is not supported. Please update to the latest version:
Microsoft Internet Explorer 5.5 found on the Intranet.","Old Internet Explorer Detected", 16)
Return
Endif

$MsJavaVersion = GETFILEVERSION(@LANROOT + "\msjava.dll")
If $MsJavaVersion < 5.00.3805
$selection = Messagebox('*****************************************************************************************************************
*****************************************************************************************************************
*****************************************************************************************************************
Please wait while the "Microsoft VM" security update patch to your Internet Explorer software is being installed.
DO NOT INTERRUPT THIS PROCESS. It may take a few minutes to complete.
*****************************************************************************************************************
*****************************************************************************************************************
*****************************************************************************************************************',"<<<<[[[[Internet Explorer Patch]]]]>>>>",48)
If GetFileSize ("C:\msjavx86.exe") = 5473872 else
COPY @LDRIVE + "\MSJAVX86.EXE" "C:\"
endif
SHELL "c:\MSJAVX86.EXE /Q:A /R:N /N:V"
endif

If $IEVersion < 5.50.4800 Goto IE55SP1Patches Endif
If $IEVersion = "5.50.4807.2300"
$PatchInstalled = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{D7B44F3E-77D3-44C5-8E03-4222D9A18B7B}","IsInstalled")
If $PatchInstalled < 1
$RUNONCEKEY = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce"
$ok = WriteValue ($RUNONCEKEY,"Patch", @LSERVER + "\NETLOGON\Q321232\55SP2\Q321232.exe /Q:A /R:N /N:V","REG_SZ")
Endif

Endif
Return

:IE55SP1Patches
$Patch2Installed = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{D7B44F3E-77D3-44C5-8E03-4222D9A18B7B}","IsInstalled")
If $Patch2Installed < 1
$RUNONCEKEY = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce"
$ok = WriteValue ($RUNONCEKEY,"Patch3", @LSERVER + "\NETLOGON\Q321232\55SP1\Q321232.exe /Q:A /R:N /N:V","REG_SZ")
Endif
Return

This is a section of code we use... It's a subroutine, so you may have to modify to get the code you want. This also updates the javavm... i hate that i had to put in that huge messagebox, but.. ah well.. management decision!

Brian

P.S. sorry for the long lines.. I was just pasting out of a script I use.

[ 10 June 2002, 18:37: Message edited by: BrianTX ]

Top
#22863 - 2002-06-10 09:47 PM Re: Need Major Help (want to install a microsoft patch)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
This didn't work.
People with the patch are getting the same results from the script as the people who do not have it. Can some one give it a quick looksee

$IEVersion=ReadValue"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InternetExplorer","Version"

if $IEVersion = "5.50.4807.2300"
$PatchInstalled = READVALUE"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\D7B44F3E-77D3-44C5-8E03-4222D9A18B7B","IsInstalled"
If $PatchInstalled < 1
$selection = Messagebox'Windows has determined that you need the Lastest IE Security Patch. This will take less than 1 minute to install. Please restart your machine when you are asked. Thank You! Press OK to Continue',"Internet Explorer Patch Security Patch Q321232",48
copy \\EB0Q2\Programs\IE55\q321232.exe "C:\"
SHELL "C:\q321232.exe -q"
else
$selection = Messagebox'This is to let you know that you already have the latest IE Security Patch. Press OK to Continue',"Internet Explorer Patch Security Patch Q321232",48
endif
endif

NOTE:For some reason I had to take out my parenthesis to post.

[ 11 June 2002, 14:45: Message edited by: condichiamnotanetworkguy ]

Top
#22864 - 2002-06-11 02:49 PM Re: Need Major Help (want to install a microsoft patch)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Never Mind. I saw my error.

I was using "()" around my Registry Key and not "{}" DOH!

[ 11 June 2002, 15:25: Message edited by: condichiamnotanetworkguy ]

Top
#22865 - 2002-06-11 03:25 PM Re: Need Major Help (want to install a microsoft patch)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Please post code enclosed within CODE tags (see Instant UBB Code). This will enable you to post parentheses.

Secondly, are you running the script under local administrative rights?

With regards to the code pieces. The READVALUE migth return a string variables instead of a integer, then tthe folowing line will fail. So, update the code to
code:
$PatchInstalled = VAL(READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Active Setup\Installed Components\{D7B44F3E-77D3-44C5-8E03-4222D9A18B7B}",
"IsInstalled"))

Scrap this, I updated the complete code a little bit, give it a try but run it under admin privileges.
code:
$IEVersion=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InternetExplorer","Version")

if $IEVersion = "5.50.4807.2300"
$PatchInstalled = VAL(READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Active Setup\Installed Components\{D7B44F3E-77D3-44C5-8E03-4222D9A18B7B}"
,"IsInstalled")
If $PatchInstalled < 1
$selection = Messagebox('Windows has determined that you need the Lastest
IE Security Patch. This will take less than 1 minute to install.
Please restart your machine when you are asked. Thank You! Press OK to Continue',
"Internet Explorer Patch Security Patch Q321232",48)
SHELL "%COMSPEC% /c /e:1024 \\EB0Q2\Programs\IE55\q321232.exe -q"
else
$selection = Messagebox('This is to let you know that you already have the latest
IE Security Patch. Press OK to Continue',"Internet Explorer Patch
Security Patch Q321232",48)
endif
endif



[ 11 June 2002, 21:31: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#22866 - 2002-06-11 09:11 PM Re: Need Major Help (want to install a microsoft patch)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Jens, you're missing brackets in your registry key:

{}

Brian

Top
#22867 - 2002-06-11 09:32 PM Re: Need Major Help (want to install a microsoft patch)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Thanks, Brian.

I knew there was something wrong with that key, it looked weird, but of course I was too lazy to double-check the registry for the correct key.
_________________________
There are two types of vessels, submarines and targets.

Top
#22868 - 2002-06-17 05:58 AM Re: Need Major Help (want to install a microsoft patch)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
did you find a solution?
greetings.

btw: possible you have the longest member name.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.038 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