Hi all,
Got this VB script which runs outside Installshield X, but not inside in the Custom Action. The error is(translated to english):
A problem has occurred. A script, needed for this installation, could not be run. Contact supportperson or dealer.
My script waits for a process to stop, and then continues the installation. It seems that the error comes when the WScript is called. It works allright in a .vbs file. Any good suggestions from you good people ? :
Function Running()
Set WshShell = WScript.CreateObject("WScript.Shell")
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set service = locator.ConnectServer()
ISProcessId = Session.Property("PROCESSID")
Set props = service.ExecQuery("select ProcessId, description from Win32_Process where ProcessId = " & ISProcessId)
num = props.Count
If num > 0 Then
Running = true
Else
Running = false
End If
Set WSHShell = Nothing
End Function
While Running()
Wscript.sleep 1000
Wend
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Custom Action
Started by
ehj
, Sep 15 2004 22:48
4 replies to this topic
Posted 15 September 2004 - 23:03
OK, I believe I've found out that WScript cannot be used in Custom Actions. How do I then stop my process, any suggestions ??
Posted 16 September 2004 - 08:58
You seem to be using an MSI type of project, not a InstallScript project. Therefore I'm moving your question to MSI custom action forum.
Stefan Krüger
InstallSite.org twitter facebook
Posted 16 September 2004 - 09:00
You don't need Wscript. The script is hosted inside MSI. You should be able to directly accessx Shell, without Wscript.
Stefan Krüger
InstallSite.org twitter facebook