This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: MSI error 1720 with vbscript
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 13, 2011
04:20 PM
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 15, 2011
10:57 AM
if you log the install it will give you a line number typically.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 15, 2011
12:55 PM
May be the MSI doesn't have permissions to perform the task...say create/copy etc