I have a strange one going on.
On one machine, Windows 7, 64bit, UAC turned off, Run as Administrator, as soon as I try read the registry from vbs it crashes.
This only happens on one machine (the bosses of course), we have other machines, same spec and it runs fine.
Here is a snippet from the MSI logs...
The ErrorMSI (c) (F8:58) [17:38:51:404]: User policy value 'AlwaysInstallElevated' is 0
MSI (c) (F8:58) [17:38:51:404]: Product installation will be elevated because user is admin and product is being installed per-machine.
MSI (c) (F8:58) [17:38:51:404]: Running product '{D85B1EE6-0A1E-4A76-B67D-59090EE270F9}' with elevated privileges: Product is assigned.
The vbs file...MSI (c) (F8:40) [17:38:56:341]: Doing action: get_install_names_from_registry.vbs
Action 17:38:56: get_install_names_from_registry.vbs.
Action start 17:38:56: get_install_names_from_registry.vbs.
MSI (c) (F8:40) [17:38:56:341]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'get_install_names_from_registry.vbs'
Action ended 17:38:56: get_install_names_from_registry.vbs. Return value 3.
DEBUG: Error 2896: Executing action get_install_names_from_registry.vbs failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: get_install_names_from_registry.vbs, ,
Action ended 17:38:56: WelcomeDlg. Return value 3.
MSI (c) (F8:58) [17:38:56:377]: Doing action: FatalError
Action 17:38:56: FatalError.
Action start 17:38:56: FatalError.
MSI (c) (F8:58) [17:38:56:377]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'FatalError'
DEBUG: Error 2826: Control BottomLine on dialog FatalError extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalError, BottomLine, to the right
Action 17:38:56: FatalError. Dialog created
Action ended 17:38:59: FatalError. Return value 2.
Action ended 17:38:59: INSTALL. Return value 3.
MSI (c) (F8:58) [17:38:59:801]: Destroying RemoteAPI object.
MSI (c) (F8:A8) [17:38:59:801]: Custom Action Manager thread ending.
Code: Select all
Dim debug
debug = false
Dim is_CTI_Install ' Dont show errors for local CRM install as they may be installing the client on the machine
is_CTI_Install = false
If Not debug then
Dim db
Set db = Session.Database
End If
If Debug then
get_names
End IF
Function get_names()
If Not debug then
If Session.Property("AI_BUILD_NAME") = "CTI" Then
is_CTI_Install = True
End IF
End If
get_names = 1
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
If Not is_64_bit Then
strKeyPath = "Software\eWare\Mappings"
Else
strKeyPath = "Software\Wow6432Node\eWare\Mappings"
End IF
on error resume next
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames, arrValueTypes
Dim reg_error
reg_error = "The installer cannot find a version of Sage CRM on this machine." &_
vbCrLf & "Please ensure you have a licensed version of CRM installed on this machine before proceeding."
If Err.Number > 0 Then
If NOT is_CTI_Install Then
Session.Property( "CRM_INSTALL_CHECK" ) = "0"
MsgBox reg_error, 65, "Error"
get_names = -1
End If
Else
Session.Property( "CRM_INSTALL_CHECK" ) = "1"
End If
If UBound(arrValueNames) < 0 Then
If NOT is_CTI_Install Then
Session.Property( "CRM_INSTALL_CHECK" ) = "0"
get_names = -1
MsgBox reg_error, 65, "Error"
End IF
If Debug Then
WScript.Echo "UBound(arrValueNames) < 0"
End If
Else
Session.Property( "CRM_INSTALL_CHECK" ) = "1"
End If
index = 1
For i=0 To UBound(arrValueNames)
'Wscript.Echo "File Name: " & arrValueNames(i) & " -- "
'Wscript.Echo "Location: " & strValue
'Wscript.Echo
install_name = arrValueNames(i)
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath, arrValueNames(i), path
' stick them into the combo
If Instr( install_name, "/" ) > 0 then
install_name = Replace( install_name, "/", "")
SQLCmd = "INSERT INTO `ComboBox` (`Property`,`Order`,`Value`,`Text`)"
SQLCmd = SQLCmd & " VALUES ('CRM_NAME','" & index & "','" & install_name & "','"
SQLCmd = SQLCmd & install_name & "') TEMPORARY"
Set view = db.OpenView( SQLCmd )
view.Execute
view.Close
If debug Then
Wscript.Echo install_name
End If
index = index + 1
End IF
Next
End Function
Function is_64_bit()
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
strValueName = "PROCESSOR_ARCHITECTURE"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'WScript.Echo "Current Processor Archiecture: " & strValue
Dim pos
pos = InStr( strValue, "64" )
If pos = 0 Then
is_64_bit = False
Else
is_64_bit = True
End If
End Function
The problem of course is, during the install it crashes. It is like as if there is a permission issue, however, as you can see it is running as an admin.
Really appreciate any help.
FOLLOW US
Get the latest news in Application Packaging