Problems with VBS
Hi,
I've got a little problem with a script stored in a CA which should create some ActiveSetup regkeys.
For testing purposes I've set a MsgBox at the top of the script to ensure that Windows Installer is entering it and so
far it is working. The mistake must be somewhere in the first three lines because as soon as i click away my error
message i get MSI error 1720. My secound MsgBox after "Set StdOut = WScript.StdOut" isn't displayed.
Someone has an idea where the problem could be?
Greetings
I've got a little problem with a script stored in a CA which should create some ActiveSetup regkeys.
For testing purposes I've set a MsgBox at the top of the script to ensure that Windows Installer is entering it and so
far it is working. The mistake must be somewhere in the first three lines because as soon as i click away my error
message i get MSI error 1720. My secound MsgBox after "Set StdOut = WScript.StdOut" isn't displayed.
Someone has an idea where the problem could be?
Greetings
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Active Setup\Installed Components\{0463bb93-634e-453c-a69b-09776a50d422}"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Active Setup\Installed Components\{0463bb93-634e-453c-a69b-09776a50d422}"
strValueName = "(Default)"
strValue = "blahblahblah"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strKeyPath = "SOFTWARE\Microsoft\Active Setup\Installed Components\{0463bb93-634e-453c-a69b-09776a50d422}"
strValueName = "StubPath"
strValue = "%windir%\system32\cmd.exe /c "asdfasdf"
oReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strKeyPath = "SOFTWARE\Microsoft\Active Setup\Installed Components\{0463bb93-634e-453c-a69b-09776a50d422}"
strValueName = "Version"
strValue = "1,0,0,0"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
captain_planet
13 years ago
Posted by:
captain_planet
13 years ago
Posted by:
Teitan
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.