cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bbchucks
Level 2

MSI error 1720 with vbscript

Hi,
looking for some help when i add this vbscript to the custom action section and compile the MSI, after running the MSI, it will error out with a 1720 error.
Running the vbscript manually (outside of the MSI) runs smoothly with no errors.

Could someone assist? below is the script.


Dim WSPDirectory
'File Consts
Const ForAppending = 8
Const ForWriting = 2
Const ForReading = 1
Const OverWriteExisting = True

Set fso = CreateObject("Scripting.FileSystemObject")

'The location of the zip file. ****************************
ZipFile="c:\Program Files\Thomson Financial\Thomson ONE\Backup\Modified-IM-Base.zip"
'The folder the contents should be extracted to.
ExtractTo="c:\Program Files\Thomson Financial\Thomson ONE\Backup\"

'EXTRACTION PROCESS ********************************
'If the extraction location does not exist create it.
Set fso = CreateObject("Scripting.FileSystemObject")
If NOT fso.FolderExists(ExtractTo) Then
fso.CreateFolder(ExtractTo)
End If
'Extract the contants of the zip file.
set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip)
Set fso = Nothing
Set objShell = Nothing

'COPYING EXTRACTED FOLDER TO REGKEY DATA DIR LOCATION ******************************
'Current user data dir check/set
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\ILX\RDC\"
strValueName = "Data Directory"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName, strCurrValue
WSPDirectory = strCurrValue
Set fso = CreateObject("Scripting.Filesystemobject")
oFolder1 = "C:\Program Files\Thomson Financial\Thomson ONE\Backup\TOIM\TOIM"
'COPY FILES TO USER PROFILES
fso.CopyFolder oFolder1, WSPDirectory ,True
fso.CopyFile "C:\Program Files\Thomson Financial\Thomson ONE\Backup\TOIM\*.xml", WSPDirectory ,True
Labels (1)
0 Kudos
(2) Replies
wallywojo
Level 4

if you log the install it will give you a line number typically.
0 Kudos
rrinblue22
Level 9

May be the MSI doesn't have permissions to perform the task...say create/copy etc
0 Kudos