Quesada
(Lurker)
2004-03-12 01:32 PM
MSI deployment problem

We are using WinInstall 7.5 and are applying the packages to our Nt environment using a Kix Script.

In the script it states to run the client launch facility and point to the package file. This works fine with all .nai (WinInstall) files but when it comes to completing a client launch on an .MSI, it cannot determin that the process is still running. At the moment i am using a sleep, but this doesn't.

I need to know if there is a switch or command i can use to wait until the MSi delivery has finished before moving onto the next client launch (Function in script).

Copy of script:
Function AppFunc32()

;Install the application if you are a member of the install group and the application does not exist
If InGroup("APP-CRYS-CYREP9-I") AND $CrysReport9=0
$lblFuncStatus.Text = "Deploying Crystal Reports 9.0..."
Shell '%comspec% /c "\\$deploysvr\ondemand$$\winstall\ntsvc32.exe /clientlaunch=(\\$deploysvr\ondemand$$\winstall\winapps.lst \\$deploysvr\ondemand$$\winstall\CrystalReports9\scrstd.msi)"'
Sleep 40
Else
;Uninstall the application if it is installed and you are not a member of the install group
If NOT InGroup("APP-CRYS-CYREP9-I") AND $CrysReport9=1
Shell '%comspec% /c "\\$deploysvr\ondemand$$\winstall\ntsvc32.exe /clientlaunch=(\\$deploysvr\ondemand$$\winstall\winapps.lst \\$deploysvr\ondemand$$\winstall\CrystalReports9\scrstd.msi /remove)"'
Sleep 30
EndIf
EndIf

EndFunction

Please help!!!


Sealeopard
(KiX Master)
2004-03-12 02:05 PM
Re: MSI deployment problem

Code:

Shell '%comspec% /c START /MIN /WAIT "\\$deploysvr\ondemand$$\winstall\ntsvc32.exe /clientlaunch=(\\$deploysvr\ondemand$$\winstall\winapps.lst \\$deploysvr\ondemand$$\winstall\CrystalReports9\scrstd.msi)"'


might succeed. Please note the added START /MIN /WAIT.

BTW, it's a best parrctive to run scripts with
Code:

$rc=setoption('explicit','on')
$rc=setoption('novarsinstrings','on')



Quesada
(Lurker)
2004-03-12 03:46 PM
Re: MSI deployment problem

cool, so the min is minimised and the wait does the wait till execution finished, right?

Not too sure what the 'Explicit' & 'Novarsinstrings' do if i were to set the code, could you explain?

Cheers!


Sealeopard
(KiX Master)
2004-03-12 06:55 PM
Re: MSI deployment problem

See the KiXtart Manual under SETOPTION().

Kdyer
(KiX Supporter)
2004-03-12 06:56 PM
Re: MSI deployment problem

One of the benefits for these options is that it forces you to write cleaner code!

Kent


LonkeroAdministrator
(KiX Master Guru)
2004-03-12 08:10 PM
Re: MSI deployment problem

and surely does frustrate newbies