Skip to content

Commit

Permalink
Merge pull request #2232 from AllenInstitute/bugfix/2232-mention-wind…
Browse files Browse the repository at this point in the history
…ows-11

CHI_CheckInstallation: Better support for Windows 11
  • Loading branch information
t-b authored Aug 19, 2024
2 parents 033b3bf + f146d2e commit 36165c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Packages/MIES/MIES_CheckInstallation.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ Function CHI_CheckInstallation()

printf "Checking system properties:\r"
printf "Igor %dbit: %s%s\r", archBits, StringByKey("IGORVERS", info), igorBuild
printf "Windows 10: %s\r", ToTrueFalse(IsWindows10())
if(IsWindows10() && archBits == 64)
printf "%s\r", StringByKey("OS", IgorInfo(3))
if(IsWindows10Or11() && archBits == 64)
aslrEnabled = GetASLREnabledState()
printf "ASLR: %s (%s)\r", ToTrueFalse(aslrEnabled), SelectString(aslrEnabled, "Nice!", "Very Bad")
if(aslrEnabled != 0)
Expand Down
8 changes: 4 additions & 4 deletions Packages/MIES/MIES_Utilities_System.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ End
Function TurnOffASLR()
string cmd, path

path = GetFolder(FunctionPath("")) + ":ITCXOP2:tools:Disable-ASLR-for-IP7-and-8.ps1"
path = GetFolder(FunctionPath("")) + ":ITCXOP2:tools:Disable-ASLR-for-Igor64.ps1"
ASSERT(FileExists(path), "Could not locate powershell script")
sprintf cmd, "powershell.exe -ExecutionPolicy Bypass \"%s\"", GetWindowsPath(path)
ExecuteScriptText/B/Z cmd
Expand All @@ -314,13 +314,13 @@ Function TurnOffASLR()
printf "Please restart Igor Pro as normal user and execute \"Mies Panels\"->\"Check installation\" to see if ASLR is now turned off or not.\r See also https://github.com/AllenInstitute/ITCXOP2#windows-10 for further manual instructions.\r"
End

/// @brief Check if we are running on Windows 10
Function IsWindows10()
/// @brief Check if we are running on Windows 10/11
Function IsWindows10Or11()
string info, os

info = IgorInfo(3)
os = StringByKey("OS", info)
return GrepString(os, "^(Microsoft )?Windows 10 ")
return GrepString(os, "^(Microsoft )?Windows 1[01]? ")
End

/// @brief Upload the given JSON document
Expand Down

0 comments on commit 36165c2

Please sign in to comment.