I need to read the location of the Temporary ASP.NET Files folder from VBScript as part of a post-installation task in an installer created using a Visual Studio 2008 deploy
I think something like this, but I haven't sorted out how to process the output values.
strComputer = "."
Const HKLM = &h80000002
Set objCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
objCtx.Add "__ProviderArchitecture", 64
objCtx.Add "__RequiredArchitecture", TRUE
Set objLocator = CreateObject("Wbemscripting.SWbemLocator")
Set objServices = objLocator.ConnectServer("","root\default","","",,,,objCtx)
Set objStdRegProv = objServices.Get("StdRegProv")
' Use ExecMethod to call the GetStringValue method
Set Inparams = objStdRegProv.Methods_("EnumValues").Inparameters
Inparams.Hdefkey = HKLM
Inparams.Ssubkeyname = "SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\"
'Inparams.Svaluename = "Logging"
set Outparams = objStdRegProv.ExecMethod_("EnumValues", Inparams,,objCtx)
'Show output parameters object and the registry value HKLM\SOFTWARE\
WScript.Echo Outparams.GetObjectText_
WScript.Echo "WMI Logging is set to " & Outparams.SValue