Jump to content


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.
Photo

error coming in Custom Action VBScript


3 replies to this topic

tron721

tron721
  • Full Members
  • 2 posts

Posted 05 June 2012 - 13:33

Hi there,

I am new to this forum. I am stuck at one point related to installation.

I am using installshield and want to execute a VBScript in custom actions. I am getting error in it as follows:

Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action WwwServiceWarningMessage script error -2147221163, : Line 83, Column 5,

And the script code is as follows:

Dim computerName
Dim wmiService
Dim processes
Dim process

' Get the list of processes
LogMessage "Getting the list of all running processes."
computerName = "127.0.0.1"
Set wmiService= GetObject("winmgmts:\\" & computerName & "\root\cimv2")
Set processes= wmiService.ExecQuery("Select * from Win32_Process")

' Check the name of each process for the ASPNET process.
LogMessage "Checking for the ASPNET process."
For Each process in processes
If (process.Name = "w3wp.exe" or process.Name = "aspnet_wp.exe") Then
LogMessage "Found the ASPNET process."
IsAspNetRunning = true
Exit Function
End If
Next

LogMessage "Did not find the ASPNET process."
IsAspNetRunning = false


line 83 is
Set processes= wmiService.ExecQuery("Select * from Win32_Process")

In installation log also, the same error is coming, nothing more.

If I run this script directly through command prompt then it is working fine. but throws error in installer.
System details are as follows:
OS : win 2k3 sp2
Installing by administrator account
connected to system remotely.

Any suggestion is well appreciated.

Edited by tron721, 05 June 2012 - 13:34.


MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 06 June 2012 - 07:14

HOw are you invoking the installer?
Is it copied to the machine or is it invoked form a network share?

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 06 June 2012 - 07:21

QUOTE
Custom action WwwServiceWarningMessage script error -2147221163, : Line 83, Column 5,

This shows clearly that your script has errors. May be, for some reason your
QUOTE
Set processes= wmiService.ExecQuery("Select * from Win32_Process")

returns a null processes. Then you are using it down somewhere.
Add proper error handling to your script. Check if return values are proper.

tron721

tron721
  • Full Members
  • 2 posts

Posted 06 June 2012 - 09:15

hi MSIYER,

I copied the installer to the machine and then tried to run.

If I am running the VBS directly then it is not producing the error and fetching all the processes successfully. So I don't think that script has error.

And this problem is coming in only one system, installer is running fine in other machines. So I think it is system specific issue, but I want to know what exactly..