code-tutorial.com

The best resources for developers

Visual Studio Setup Project - Per User Registry Settings.

const HKEY_USERS = &H80000003
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputer & "
ootdefault:StdRegProv")
strKeyPath = ""
objReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys
strKeyPath = "SoftwareMicrosoftWindowsCurrentVersionWinTrustTrust ProvidersSoftware Publishing"
For Each subkey In arrSubKeys
    objReg.SetDWORDValue HKEY_USERS, subkey & strKeyPath, "State", 146944
Next

Tags: windows registry installation visual-studio

Source: By Ray as answer to the question

This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0


Related code-snippets: