cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

Detecting VBScript Runtime Engine

I have the following VBScript to hide the Uninstall cancel button on uninstall:

Const msiMessageTypeCommonData = &H0B000000

Set rec = Installer.CreateRecord(2)

rec.IntegerData(1) = 2
rec.IntegerData(2) = 0

Message msiMessageTypeCommonData, rec

This works good, but on one machine that I know of it will fail with a VBscript runtime error.

I don't know if it is the code itself or if the machine maybe does not have the VBScript runtime engine.

If it is the engine then is there anyway I can determine if the runtime engine exists and if not then set my custom action with a condition not to launch if the runtime engine is not found.

Now if it is the code then can anyone point out where the mistake may be?

Thanks,
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

Is there any text to your "VBScript runtime error"? That code looks similar to the code in this tip (PDF)---http://www.acresso.com/webdocuments/PDF/disable.pdf---so no obvious issues there...
0 Kudos
Tim_Mayert
Level 9

Yes the VBScript error looks like this:

Error 2738. Could not access VBScript run time for custom action .

That is all that the error stated....

So could this mean that the machine that it is running on does not have a VBScript run time engine or is this some other issue.

Have only seen this on the one machine at the moment, but then the we only just released a little while ago.

Thanks,
0 Kudos