#108615 - 2003-11-21 02:11 PM
Kix waiting for silent setups
|
j0ep
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
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Can you show us what you have for a script?
Kent
|
Top
|
|
|
|
#108618 - 2003-11-21 02:18 PM
Re: Kix waiting for silent setups
|
j0ep
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
|
|
|
|
#108622 - 2003-11-21 06:39 PM
Re: Kix waiting for silent setups
|
Radimus
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...
|
Top
|
|
|
|
#108624 - 2003-11-22 11:47 PM
Re: Kix waiting for silent setups
|
kholm
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
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|