Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I have an installer that reads from the registry to find the AutoCAD version and location. It was working until recently. It seems the new computers being given out won't let the installer read from the registry. People have been running it as admin in the past but it doesn't accept this anymore. Has anyone run into this and if so what permissions do I need to ask IT for? They tried giving people admin rights but it doesn't seem to work..
Thanks
' Get the AutoCAD current version registry key
Private Function GetAcadCurVerKey() As String
Dim rkcu As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser
Dim path As String = "Software\Autodesk\AutoCAD\"
Using rk1 As Microsoft.Win32.RegistryKey = rkcu.OpenSubKey(path)
path += rk1.GetValue("CurVer")
Using rk2 As Microsoft.Win32.RegistryKey = rkcu.OpenSubKey(path)
Return path & "\" & rk2.GetValue("CurVer")
End Using
End Using
End Function
' Get the acad.exe location for the AutoCAD current version
Private Function GetAcadLocation() As String
Dim rklm As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.LocalMachine
Dim path As String = GetAcadCurVerKey()
Using rk As Microsoft.Win32.RegistryKey = rklm.OpenSubKey(path)
Return DirectCast(rk.GetValue("AcadLocation"), String)
End Using
End Function
Solved! Go to Solution.