1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| On Error Resume Next
Dim objShell, objFSO, SystemDrive, WshShell, OsType
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.shell")
Set WshShell = CreateObject("WScript.Shell")
set filesys=CreateObject("Scripting.FileSystemObject")
SystemDrive = objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")
OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")
'Install application
If OsType = "x86" then
objShell.run "I:\setup.exe /S", 1, True
Wscript.quit
elseif OsType = "AMD64" then
objShell.run "I:\setup.exe /S", 1, True
Wscript.quit(Exitcode)
end if |
Partager