Skip to content

Commit

Permalink
Update Other.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 authored Dec 21, 2024
1 parent e025c95 commit 25dce65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Other.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ Start-Process -FilePath ($DriveLetter + ":\" + "WinSDKSetup.exe") @("/features",
Dismount-DiskImage -ImagePath "$PSScriptRoot\WindowsSDK.iso"

# Auto elevate script
$IsAdmin = ([Security.ncipal.Windowsncipal][Security.ncipal.WindowsIdentity]::GetCurrent()).IsInRole([Security.ncipal.WindowsBuiltInRole]"Administrator")
$IsAdmin = ((New-Object -TypeName System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator))
if (-not $IsAdmin)
{
Start-Process -FilePath powershell.exe -ArgumentList "-ExecutionPolicy Bypass -NoProfile -NoLogo -File `"$PSCommandPath`"" -Verb Runas
Expand Down

0 comments on commit 25dce65

Please sign in to comment.