I have a following problem:
Customer's custom install script needs to import a reg file. It is done from a VBScript file running in system context with the command (32bit)
cmd /c reg import reg_neu32Bit.reg /reg:32
or 64bit
cmd /c reg import reg_neu.reg /reg:64
When run manually from console with admin rights, it imports all the keys successfully. When run from the VBScript however, the import breaks off in the middle, with no feedback, only some keys (up to the line NetworkServerFile) are imported, no keys below this line are found in registry.
The reg file looks like this:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Company\__Tool3] "EnableEM"="True" "EnableRegistry"="True" [HKEY_LOCAL_MACHINE\SOFTWARE\SOME_SOFT\Tool3_V3\SOMETHING] "PathToInstantClient"="C:\\Program Files\\SOME_SOFT\\Tool3_V3\\instant_client" "MemorySize"="640000" "RowCount"="1000" "CONNECTIONTYPE"="SOMETHING" "NetworkServerStatus"="False" "NetworkServerFile"="" "CheckIsAdmin"="success" "PWD"="123456......................" "TNS"="appp" "USR"="app" "NLS_LANG"="GERMAN_GERMANY.AL16UTF16" "BIN_PWD"=hex:ab..... "TNS_ADMIN"="\\\\somenetpath"
Any idea why this could happen?
Edit:
VBScript code:
ReDim Preserve aShellRunAI(0)
If iBits = 64 Then
aShellRunAI(0) = "cmd /c reg import reg_neu.reg /reg:64"
Else
aShellRunAI(0) = "cmd /c reg import reg_neu32Bit.reg /reg:32"
End If
and later in sequence:
For Each sCmd In aShellRunAI
WriteToLog 0, "sCmd:" & sCmd
Call oShell.Run(sCmd, 0, True)
Next
cmd /c reg import ... >>C:\reg.log 2>&1
, so that you get a log with the actual output from the import command. Also check the exit code:rc = oShell.Run(sCmd, 0 , True) : If rc <> 0 Then WScript.Echo "Reg import failed. Exit code: " & rc
. - Ansgar Wiechers