我正在尝试将一些 DLL 从APPDATA
系统根目录复制并注册它们,但我不断收到“找不到路径错误”。
On Error Resume Next
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "%AppData%\something\something\something\x64\*.dll" , "C:\Windows\SysWOW64\" , OverwriteExisting
objFSO.CopyFile "%AppData%\something\something\something\x86\*.dll" , "C:\Windows\System32\" , OverwriteExisting
Dim objShell
Set WshShell = WScript.CreateObject( "WScript.Shell" )
WshShell.run "c:\windows\SysWOW64\regsvr32.exe /s c:\windows\SysWOW64\something.dll"
WshShell.run "c:\windows\SysWOW64\regsvr32.exe /s c:\windows\SysWOW64\something.dll"
WshShell.run "c:\windows\SysWOW64\regsvr32.exe /s c:\windows\SysWOW64\something.dll"
wscript.sleep 1000
WshShell.run "c:\windows\System32\regsvr32.exe /s c:\windows\SysWOW64\something.dll"
WshShell.run "c:\windows\System32\regsvr32.exe /s c:\windows\SysWOW64\something.dll"
WshShell.run "c:\windows\System32\regsvr32.exe /s c:\windows\SysWOW64\something.dll"