I have been having problems with creating a reg key with a path as its name and it is extremely furstrating. This is the key I am trying to create.
Path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\"
strReg1 = "C:\\Program Files\\Symantec\\SYMEVNT1.DLL"
If KeyExists (Path & StrReg1) = False Then
WSHShell.RegWrite Path & strReg1, "1"
End If
This script works if I don't name the regKey with a path (i.e. c:\program files) and just use the fileName (i.e. symenvt1.dll). So I'm guessing I'm doing something wrong with the forward slash marks, but I have tried it every which way and nothing works. This scripts creates sub-directories, instead of a regKey with a string name of "C:\\Program Files\\Symantec\\SYMEVNT1.DLL".
Any help would be appreciated. Thank you.
Path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\"
strReg1 = "C:\\Program Files\\Symantec\\SYMEVNT1.DLL"
If KeyExists (Path & StrReg1) = False Then
WSHShell.RegWrite Path & strReg1, "1"
End If
This script works if I don't name the regKey with a path (i.e. c:\program files) and just use the fileName (i.e. symenvt1.dll). So I'm guessing I'm doing something wrong with the forward slash marks, but I have tried it every which way and nothing works. This scripts creates sub-directories, instead of a regKey with a string name of "C:\\Program Files\\Symantec\\SYMEVNT1.DLL".
Any help would be appreciated. Thank you.