Page 1 of 1 1
Topic Options
#113301 - 2004-02-04 04:58 PM How to select "ok" in windows dialog
john7033 Offline
Fresh Scripter

Registered: 2004-02-04
Posts: 5
I have a script to check the registry for an IE patch. If the value isn't found, the script tries to execute each of three patches. (We have three different win platforms)

Instead of checking for the IE version and patch level, I just run each of the patches and the correct one will install while the incorrect ones pop up a message box informing the user that this patch is the wrong one. I want to have the script send a crlf to the message box to simulate the user clicking on the "ok" button, but it doesn't work. How can I send this crlf to the message box?

--- script ---
;########################################################################
; create the patch directory and copy patches to the directory


$RETURN = CHR(13) + CHR(10)
if exist('c:\patches')=0
md 'c:\patches'
endif

SHELL "CMD.EXE /C COPY P:\Admin\patches\IE6sp1.exe C:\patches"
SHELL "CMD.EXE /C COPY P:\Admin\patches\IE6.exe C:\patches"
SHELL "CMD.EXE /C COPY P:\Admin\patches\IE_5.5.exe C:\patches"


; check the registry for the presence of this patch
$patch = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{peddbec60-89cb-44ef-8291-0850fd28ff6a}","ComponentID")
If @ERROR = O
" $patch found in registry"
$RETURN
Endif

if $patch = Q832894
"Found. No further action needed."
else

RUN C:\patches\IE_5.5.exe
$RETURN
sleep 3
RUN C:\patches\IE6.exe
$RETURN
sleep 3
RUN C:\patches\IE6sp1.exe
$RETURN
sleep 3

Endif


Top
#113302 - 2004-02-04 05:01 PM Re: How to select "ok" in windows dialog
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Run the patches in silent mode by specifying the appropriate switch e.g. /q.
_________________________
There are two types of vessels, submarines and targets.

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 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.047 seconds in which 0.023 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