I set it to the PC name but it could be anything you like.

Thought I may as well save other people a few hours of pain (or maybe I was just having a slow day).

Bits and pieces cut and pasted from various sources so I'm not claiming full credit or anything. :p

Let me know if it works for you.


' Create temp file with the script that regini.exe will use

set oFSO = CreateObject("Scripting.FileSystemObject")
strFileName = "C:\temp\computername.ini"
set oFile = oFSO.CreateTextFile(strFileName)
oFile.WriteLine "HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} [1 5 7 11 17]"


' Change registry permissions with regini.exe
set oShell = CreateObject("WScript.Shell")

wscript.echo "regini " & strFileName

oShell.Run "regini " & strFileName, 8, true

'oFSO.DeleteFile strFileName

Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputerName = wshNetwork.ComputerName

wscript.echo """" & strComputerName & """"

strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
strValueName = ""
strValue = strComputerName

oReg.SetExpandedStringValue _
0 Comments   [ + ] Show Comments


Please log in to comment

There are no answers at this time
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Answer this question or Comment on this question for clarity