I have some vbscript inserted directly into the custom action like this:
dim servicelist, service
Set servicelist= GetObject("winmgmts:").InstancesOf("Win32_Service")
for each service in servicelist
if service.name = "MSSQL$THEDATABASE" then
Property("MSSQLTHEDATABASE_SERVICE_PRESENT")="1"
end if
next
The install containing this custom action has been run on many different test machines without incident, but when it runs on a certain machine, I get this error:
Custom action IsMSSQLTHEDATABASEPresent script error -2146827837, Microsoft VBScript runtime error: Object not a collection Line 5, Column 1,
MSI © (8C:30): Product: Component Run-Time Conditioning -- Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run.
The machine in question is running Windows 2000 Professional with service Pack 3. However, other machines that are running the same environment do not run into this error, and even other machines running Service Pack 2 do not experience this problem. Other machines with Service Pack 3 also do not experience this problem. The prerequisites for installing this product are SQL 2000 MSDE and MSMQ.
This error only persists when the script is running within the install. When the script is run outside of the install on its own, the error "Object not a collection Line 5, Column 1" does not appear. The custom action is set to immediate execution, always execute.
I have tried running this custom action with the code stored directly in the custom action as well as having it stored in the binary table, but the resulting error persists. I have also tried shortening the property name from MSSQLTHEDATABASE_SERVICE_PRESENT to something significantly shorter, but that did not seem to work either. I've pretty much run out of ideas.
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.
VBScript error in Custom action
Started by
uMan26
, Nov 08 2002 19:47
2 replies to this topic
Posted 12 November 2002 - 13:33
is it possible that this is related to the declaration of the object ?
there is a kb article 129871 that describes a similiar behaviour...
there is a kb article 129871 that describes a similiar behaviour...
Posted 13 November 2002 - 04:07
I'm no expert but it would seem to me that if "GetObject" failed (perhaps WMI not installed) that you would expect something similar. For debugging I'd split lines like these...
---
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm