Message 1 of 5
Import REG file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How do I import a REG file using VBA? I am pretty much a hack when it comes to programming so please bear with me. I found two scripts online that I modified but neither worked. The VBA project runs with no errors but the registry is not modified. Here are the two scripts that I tried. Does anyone have a script that will work?
Private Sub ImportReg()
CreateObject("WScript.Shell").Run "%WinDir%\Regedit.exe /s ""Z:\Autodesk 2020\default scale list.reg"""
End Sub
Private Sub ImportReg()
Set ofile = CreateObject("scripting.FileSystemObject")
Set oshell = CreateObject("wscript.shell")
sRegFile = "Z:\Autodesk 2020\default scale list.reg"
If ofile.FileExists(sRegFile) Then
iReturn = oshell.Run("regedit.exe /s" & sRegFile)
Set ofile = Nothing
Set oshell = Nothing
End Sub
Jeff Paulsen
Civil 3D 2020.4 | Win 10 Pro N 64-bit
Xeon W-2223 @ 3.60GHz, 32GB Ram | NVidia Quadro P2200
Civil 3D 2020.4 | Win 10 Pro N 64-bit
Xeon W-2223 @ 3.60GHz, 32GB Ram | NVidia Quadro P2200