Page 1 of 1 1
Topic Options
#155499 - 2006-01-17 03:34 PM SHELL Command (When a setup program has completed)
Marc_Dufresne Offline
Fresh Scripter

Registered: 2004-04-07
Posts: 5
I am using the SHELL command to launch the Novell GroupWise 6.5.5 setup routine to update our GroupWise Client software on a Windows 2000 Network.

I would like to stop the script from running until the setup.exe routine is completed. Once its completed, I want to prompt the user or just reboot the system to enable changes. I cannot find any command line switches for Novell GroupWise 6.5.5, that has a "REBOOT" switch. Therefore, I have to create my own code. I'm stuck on which condition to monitor that would tell me when the setup routine has completed.

Here's a sample of my code.
; Install/Upgrade Novell GroupWise Client Software.
$return = MessageBox("The system has determined that a newer version of GroupWise Software "
+ "is available for your computer. To begin the installation please "
+ "select OK.", "GroupWise Install Routine", 64)

Shell($ClientPathvGW65 + "setup.exe")
;How do I stop the script to wait for the setup routine to complete????

;Prompt user changes will take affect after next reboot.
$return = MessageBox("Novell GroupWise Software Installation is complete. "
+ "Changes will take effect on the next system restart. "
+ "Select OK to restart your system.", "GroupWise Install Routine", 64)

; Reboot system immediately.
;$RC = Shutdown("", "System is being restarted to enable new settings.", 0, 1, 1)

Top
#155500 - 2006-01-17 03:36 PM Re: SHELL Command (When a setup program has completed)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
How about this ...

Shell "%COMSPEC% /C " + $ClientPathvGW65 + "setup.exe"

btw - depending on how this setup is built - this may be a real tough thing to do.

Top
#155501 - 2006-01-17 03:40 PM Re: SHELL Command (When a setup program has completed)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
shell is a command, thus loose the parens.

the setup has it's own switches and you should check out if it has wait switch.
if not, then need to try some other methods.

as why the shell does not pause the execution.
it does.
but the setup.exe spawns a new process that does the actual installation and then dies.
thus, kixtart's shell is happy and continues.
_________________________
!

download KiXnet

Top
#155502 - 2006-01-17 03:41 PM Re: SHELL Command (When a setup program has completed)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and shawn, you nasty basta.
shell is command, not a function.
_________________________
!

download KiXnet

Top
#155503 - 2006-01-17 03:43 PM Re: SHELL Command (When a setup program has completed)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
right - fixed.
Top
#155504 - 2006-01-17 03:50 PM Re: SHELL Command (When a setup program has completed)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You may want to try the Start /Wait switch.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155505 - 2006-01-17 04:08 PM Re: SHELL Command (When a setup program has completed)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
You may also to a process check, if there are no silent install commands.

do a manual install, while installing look at your processes, see if you can find setup.exe or issetup.exe, or whatever it is using.

then for scripting purposes...

shell '... '
sleep 5
while EnumProcess("setup.exe")
sleep 2
loop
$RC = Shutdown("", "System is being restarted to enable new settings.", 0, 1, 1)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#155506 - 2006-01-17 04:12 PM Re: SHELL Command (When a setup program has completed)
Marc_Dufresne Offline
Fresh Scripter

Registered: 2004-04-07
Posts: 5
That's exactly what's happening. I will continue to see if the GroupWise Setup.exe has additional switches that support wait.

So far, I've come up dry.

Top
#155507 - 2006-01-17 04:30 PM Re: SHELL Command (When a setup program has completed)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so far?
where have you looked this far?
_________________________
!

download KiXnet

Top
#155508 - 2006-01-17 05:51 PM Re: SHELL Command (When a setup program has completed)
Marc_Dufresne Offline
Fresh Scripter

Registered: 2004-04-07
Posts: 5
This while loop and the EnumProcess Function did the trick. Thanks Man!!!!

shell '... '
sleep 5
while EnumProcess("setup.exe")
sleep 2
loop
$RC = Shutdown("", "System is being restarted to enable new settings.", 0, 1, 1)

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, 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.086 seconds in which 0.045 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