Problem with external VBScript - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Bleile Datentechnik
Posts: 12
Joined: Mon Oct 11, 2010 3:13 pm

Problem with external VBScript

Hi all,

I've got a problem with an external vbs. During the installation i get an error message:
"A script required for this install to complete could not be run ...."

My vbs gets executed at InstallExecuteSequence -> InstallInitialize with "Deferred with no impersonation" rights

What is wrong?

Code: Select all

Function SetPropertiesForGMPortalInstaller()
Dim LangID
Dim PrimaryID

LangID = Session.Property("UserLanguageID")
PrimaryID = LangID And &H3FF
Select case PrimaryID
	' Deutch
	Case 7
		Session.Property("SPRNR") = 255
		Session.Property("CPGNR") = 437
	' English
	Case 9
		Session.Property("SPRNR") = 250
		Session.Property("CPGNR") = 437
	' Español
	Case 10
		Session.Property("SPRNR") = 251
		Session.Property("CPGNR") = 437
	' Français
	Case 12
		Session.Property("SPRNR") = 253
		Session.Property("CPGNR") = 437
	' Magyar
	Case 14
		Session.Property("SPRNR") = 248
		Session.Property("CPGNR") = 852
	' Italiano
	Case 16
		Session.Property("SPRNR") = 254
		Session.Property("CPGNR") = 437
	' Nederlands
	Case 19
		Session.Property("SPRNR") = 252
		Session.Property("CPGNR") = 437
	' Polski
	Case 21
		Session.Property("SPRNR") = 244
		Session.Property("CPGNR") = 852
	' Português
	Case 22
		Session.Property("SPRNR") = 243
		Session.Property("CPGNR") = 850
	' Românã
	Case 24
		Session.Property("SPRNR") = 236
		Session.Property("CPGNR") = 437
	' Pyccknñ
	Case 25
		Session.Property("SPRNR") = 247
		Session.Property("CPGNR") = 866
	' Slovenscina
	Case 27
		Session.Property("SPRNR") = 237
		Session.Property("CPGNR") = 852
	' Default Language is English
	Case Else
		Session.Property("SPRNR") = 250
		Session.Property("CPGNR") = 437
End Select
End Function
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Problem with external VBScript

Hi,

We ran a simple package where we included the function that you created and we received the following result in the installation log file:
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 scripts.js script error -2146828275, Microsoft VBScript runtime error: Type mismatch: 'LangID' Line 6, Column 5,

Action ended 15:00:00: InstallExecute. Return value 3.
To create a installation log file use the “Run and Log” item of the [ Run ] button context menu or the “Project > Run and Log” menu item. The resulting Windows Installer log will be showed in the “Run Log” Panel.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Bleile Datentechnik
Posts: 12
Joined: Mon Oct 11, 2010 3:13 pm

Re: Problem with external VBScript

Thank u very much! i have found the problem in my script:

Session.Property("SPRNR") = 437 ==> Session.Property("SPRNR") = "437" :D

Return to “Common Problems”