Scripting problems when installing an MSI
I've recently upgraded from Windows XP SP3 (32-bit) to Windows 7 (64-bit) on my work machine, and I'm attempting to install an MSI package for some software my company develops. This MSI is built using WIX, and contains some VBScript code for performing various installation tasks. When I try to install the MSI, I'm getting the following error: 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 SetRegVariables script error -2146827859, Microsoft VBScript runtime error: ActiveX component can't create object: 'Scripting.FileSystemObject' Line 148, Column 5, I'm able to run the offending function in a regular .VBS file without any problems, but it appears that msiexec is unable to create FSO objects. The same MSI has worked fine for other Windows 7 users at my office (on both 32- and 64-bit systems), but it's failing on mine. I've tried reregistering vbscript.dll and scrrun.dll, but that hasn't helped (in fact, on a side note, if I try to unregister scrrun.dll, I get an error 0x8002801c, but it registers without any problems). Is this a security-related problem (not having permissions to create the object), or is something more nefarious to blame? Here's a chunk from the function that's failing (line 148 is the CreateObject call): function SetRegVars ' Function variables Dim strRegPath, strOmniUserHome, strUserHome, nLength, bVista Dim strMyDocs, nLengthPathPart, strPathPart Dim strRegFile Dim shFSO 'Create a File System object Set shFSO = CreateObject ("Scripting.FileSystemObject") bVista = false IF ( StrComp(Session.Property("IS_VISTA"),"1",1) = 0) THEN bVista = true END IF ' Retrieve the Person Folder property which is the user's "My Documents' folder strUserHome = Session.Property("PersonalFolder") nLength = Len( strUserHome ) ' For Vista the user folder is Documents and for ' previous OSs it is My Documents IF (bVista) THEN strMyDocs = Right(strUserHome,10) ' Remove 'Documents\' from the end of the string which is 10 characters long. IF (StrComp(strMyDocs,"Documents\",1) = 0) THEN strUserHome = Left(strUserHome, (nLength - 10)) END IF ELSE strMyDocs = Right(strUserHome,13) ' Remove 'My Documents\' from the end of the string which is 13 characters long. IF (StrComp(strMyDocs,"My Documents\",1) = 0) THEN strUserHome = Left(strUserHome, (nLength - 13)) END IF END IF ...... end function
November 18th, 2010 12:52pm

Another interesting note: when I upgraded from WinXP, I performed a Custom install without wiping my hard drive first, whereas other users wiped their drive first, then installed Win7. Could this be part of the problem?
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 1:50pm

Since it is a source code related issue, please discuss in: Visual Basic Developer Center > Visual Basic Forums > Visual Basic GeneralPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
November 24th, 2010 2:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics