Last active
September 29, 2015 02:08
-
-
Save keeganwitt/1531705 to your computer and use it in GitHub Desktop.
Deletes temp file that prevents RIS 2.0 from launching correctly on newer versions of Windows then launches RIS 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Author: Keegan Witt | |
rem Description: Deletes temp file that prevents RIS 2.0 from launching correctly on newer versions of Windows then launches RIS 2.0 | |
del "%TEMP%\Ris 2.0.mov.#res" | |
if %PROCESSOR_ARCHITECTURE% == x86 ( | |
"%PROGRAMFILES%\LEGO MINDSTORMS\RIS 2.0\LaunchRis2.exe" | |
) else ( | |
"%PROGRAMFILES(X86)%\LEGO MINDSTORMS\RIS 2.0\LaunchRis2.exe" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Author: Keegan Witt | |
' Description: Launches the launchRis.bat batch script on the appropriate path (checks architecture information) | |
Set WshShell = WScript.CreateObject("WScript.Shell") | |
If Is64Bit = True Then | |
obj = WshShell.Run("""%PROGRAMFILES(X86)%\LEGO MINDSTORMS\launchRis.bat""", 0) | |
Else | |
obj = WshShell.Run("""%PROGRAMFILES%\LEGO MINDSTORMS\launchRis.bat""", 0) | |
End If | |
set WshShell = Nothing | |
Function Is64Bit() | |
Is64Bit = False | |
Dim colOS : Set colOS = GetObject("WinMGMTS://").ExecQuery("SELECT AddressWidth FROM Win32_Processor",, 48) | |
Dim objOS | |
For Each objOS In colOS | |
If objOS.AddressWidth = 64 Then Is64Bit = True | |
Next | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment