Page 1 of 1 1
Topic Options
#108615 - 2003-11-21 02:11 PM Kix waiting for silent setups
j0ep Offline
Fresh Scripter

Registered: 2003-09-26
Posts: 14
Currently I'm working on a VPN setup script for homeusers. Windows Installer and the VPN client are installed silently through the script (Shell command). Everything is working oke, only the waiting for the install doesn't work. After I start the setup, the script continues immediately.

I know I can use Sleep, but I really don't want to. Any options ?




Top
#108616 - 2003-11-21 02:14 PM Re: Kix waiting for silent setups
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can you show us what you have for a script?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#108617 - 2003-11-21 02:17 PM Re: Kix waiting for silent setups
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
kix waits for the exe launched to finish before it continues.
and if you look at it in taskmanager it is finished.
_________________________
!

download KiXnet

Top
#108618 - 2003-11-21 02:18 PM Re: Kix waiting for silent setups
j0ep Offline
Fresh Scripter

Registered: 2003-09-26
Posts: 14
i've written it in fucntions, here's the function that installs netscreen remote, the VPN-client. When I look in the taks manager (win9x) Setup is visible, it dissappears when the program is installed.

Code:

Function Installns()
$inipath = $dirname + "\vpn\oemexts.ini"
$installpath = $systemdrive + "\Program Files\Netscreen\Netscreen-Remote"
WriteProfileString ( $exepath + "\vpn\setup.ini", "OemExtensions", "OemIniLocation", Chr(34) + $inipath + Chr(34) )
WriteProfileString ( $exepath + "\vpn\oemexts.ini", "DialogDestPathandType", "TargetDir", Chr(34) + $installpath + Chr(34) )
$lblStatus.Text = "Bezig met installeren Netscreen Remote.."
Shell "%COMSPEC% /c " + $exepath + "\VPN\setup.exe -s"
Copy $EXEpath + "\" + $companyname + "\NSOK.PRV" $systemdrive + "\Program files\Netscreen\NSOK.PRV"
Sleep 5
InstallnsDone()
EndFunction



Edited by j0ep (2003-11-21 03:18 PM)

Top
#108619 - 2003-11-21 06:09 PM Re: Kix waiting for silent setups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Silent install is not always an exact science... Have a look in the FAQ
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#108620 - 2003-11-21 06:10 PM Re: Kix waiting for silent setups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Here is one of those FAQs...
How do we deploy an application? - InstallShield and others
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#108621 - 2003-11-21 06:19 PM Re: Kix waiting for silent setups
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
MS silent installs - what a joke. I can't count the number of "silent installs" I have seen that, as soon as trouble arises, pops a modal messagebox complaining about disk space or incorrect versioning ... which totally stops our Tivoli distribution process dead in it's tracks ... hellooo ... its supposed to be silent, return a meaningfull @ERROR code or something but carry on for cripes sakes ... sorry, just venting ...
Top
#108622 - 2003-11-21 06:39 PM Re: Kix waiting for silent setups
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
have you seen the new patches for MSOffice.

completely silent, except for the progress boxes and the modal "OK" buttons that say the patch was successful. boneheads...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#108623 - 2003-11-21 06:59 PM Re: Kix waiting for silent setups
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Crap ! I just realized something - your using Kixforms along with this Kixscript ! Install Shield setup programs DO NOT WORK with Kixforms enabled Kixscripts ! There is a very long technical reason why this is ... suffice to say that it doesn't work and there is no work-around that I know of at this time.

I did attempt to fix this in one of the more recent versions of Kixforms but didn't get much feedback on success, let me diggup the details !

How you can check for this - you might find that after the install the NTDVM and wow.exe crap from this install is still "hanging-around" and gumming up the works !

Top
#108624 - 2003-11-22 11:47 PM Re: Kix waiting for silent setups
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
I have a possible workaround for the KiXforms/Shell "Install-Shield" blocking

Use the Run-command instead of the Shell-command.

But then how do i make the script wait for completion of the 'install shileld" ?

Try using this UDF:
Code:

Function wmiRunWait($CmdLine)
$oWMIService = GetObject("winmgmts:root\cimv2")
$Qry = "Select * from Win32_Process"
Run "$CmdLine" ; Start separate thread to avoid blocking
$Found = 0
Do ; Wait for CmdLine to appear in running processes
Sleep 1
$cItems = $oWMIService.ExecQuery($Qry)
For Each $oItem In $cItems
If $oItem.CommandLine = $CmdLine
$Found = 1
EndIf
Next
Until $Found
Do ; Wait for CmdLine to disappear from running processes
$Found = 0
Sleep 1
$cItems = $oWMIService.ExecQuery($Qry)
For Each $oItem In $cItems
If $oItem.CommandLine = $CmdLine
$Found = 1
EndIf
Next
Until Not $Found
EndFunction




Example:

You want to execute: "\\Server\Share\Setup.exe" and wait for completion

Use:
wmiRunWait("\\Server\Share\Setup.exe")

Instead of
Shell "\\Server\Share\Setup.exe"


-Erik


ps.
I recognize the: "wow.exe crap"

It seems that KiXtart Shell-command by survailing a process and all spawned processes can block these from running.

So the UDF: wmiRunWait()

Is a way of creating a less "efficient" Shell-command

Top
#108625 - 2003-11-24 10:31 AM Re: Kix waiting for silent setups
j0ep Offline
Fresh Scripter

Registered: 2003-09-26
Posts: 14
Thanx for thinking with me. So, I use one installshield silent scirpt (*.iss) and the Windows installer (instmsia.exe).

I'll try the RUN and RETURN command. Problem with the NS remote setup, that it's got a REBOOTTIMEOUT in an ini file. The program forces the computer to reboot, if you u turn it off and reboot manually, the VPN Client doesn't work . Probably a bug/issue that can only be corrected by the developer. Porbably just have to wait for an update...Got a temporary workaround.

Anyway, thanx for all the suggestions and I do use KixForms.


Edited by j0ep (2003-11-24 10:36 AM)

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 186 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.085 seconds in which 0.059 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