Page 1 of 1 1
Topic Options
#48363 - 1999-10-18 02:59 PM SHELL command help please?
Anonymous
Unregistered


Hi group, I am a little new to Kix.

The script below runs a setup.exe according to the settings in the .iss file, and once completed needs to delete the test.ini file which is created as part of the setup.

The problem is that the setup routine has not completed by the time the script tries to delete the file which then fails as it is not there.

I have kludged it with the SLEEP commend, but how can I test that the setup has completed before going on to the next stage?

Thanks for help
Steve

;Tests for presence of existing installation
$wfc = EXIST ("C:\test.ini")
IF $wfc=1

MESSAGEBOX("Already installed - Contact Administrator", "Test Deployment",0)
EXIT
ELSE
SHELL "I:\disk1\setup -s"
SLEEP 20
DEL "C:\test.ini"
MESSAGEBOX ("Installation Completed", "Test Deployment",0)
ENDIF

Top
#48364 - 1999-10-18 06:23 PM Re: SHELL command help please?
Anonymous
Unregistered


It sounds like your setup spawns something else and doesn't wait for a return, as the shell command waits until completion before continuing. If you can't change the setup program stay open until all is completed, you might want to just build error checking into the delete. This could loop forever if your app never closes, so fixing the setup would be better, but... not all things are practical.
Hope this helps,
Steve

--------------
;Tests for presence of existing installation
$wfc = EXIST ("C:\test.ini")
IF $wfc=1

MESSAGEBOX("Already installed - Contact Administrator", "Test Deployment",0)
EXIT
ELSE
SHELL "I:\disk1\setup -s"

Do
SLEEP 3
DEL "C:\test.ini"
Until @Error = 0

MESSAGEBOX ("Installation Completed", "Test Deployment",0)
ENDIF

Top
#48365 - 1999-10-20 10:26 AM Re: SHELL command help please?
Anonymous
Unregistered


You can use something like my search_proc function (posted above) to search for the existance of the setup process. It will detect the presence of a process name (such as your setup program) and you can just loop it until it returns with a failure (process not found) then your script continues on it's merry way.

------------------
K Torkelson
Sys Admin Analyst
ktorkelson@providentfunding.com


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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.05 seconds in which 0.025 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