forked from linxinhong/menuz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.vbs
20 lines (20 loc) · 1.7 KB
/
run.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Dim Mode
If Wscript.arguments.count > 0 Then
Mode = Wscript.arguments(0)
End If
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
Set objShell = CreateObject("Wscript.Shell")
CurrentDir = Left(Wscript.ScriptFullName,InstrRev(WScript.ScriptFullName,"\"))
For Each objItem in colItems
If InStr(objItem.SystemType, "86") <> 0 Then
RunMenuZ = """" & CurrentDir & "Apps\Autohotkey\AutoHotkeyU32.exe"" " & """" & CurrentDir & "Menuz.ahk"" " & Mode
ElseIf InStr(objItem.SystemType, "64") <> 0 Then
RunMenuZ = """" & CurrentDir & "Apps\Autohotkey\AutoHotkeyU64.exe"" " & """" & CurrentDir & "Menuz.ahk"" " & Mode
Else
X86orX64 = objItem.SystemType
End If
Next
objShell.Run RunMenuZ