OK, I am new to VBScripting and (trying) to write to the registry so please be gentle.
I have some code written that goes like this:
Dim WshShell
Dim KeyName, ValueName, ValueData As String
Set WshShell = WScript.CreateObject("WScript.Shell")
KeyName = "HKEY_USERS\S-1-5-21-1749436377-938699083-1307212239-11542\Software\Autodesk\AutoCAD\R16.2\ACAD-4008:409\Profiles\Test\General"
ValueName = "SheetSetTemplatePath"
ValueData = "I:\Path\Test"
WshShell.RegWrite KeyName & ValueName & ValueData"
WshShell = Nothing
I am sure there are a few things wrong in the code as it is erroring out on me.
I am a bit suprised, I am not sure why it is erroring out when creating the WScript.Shell Object but that is where it seems to be.
If someone could help steer me in the right direction, I would appreciate it.
Also, I was wondering if it is possible to access The WScript.Shell Object from within AutoCAD VBA as well?
Thank you,
Mark