いくつかの 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"