Skip to content

Commit

Permalink
Merge pull request #174 from emadadel4/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
emadadel4 authored Dec 12, 2024
2 parents fc120b0 + 492ef80 commit 330fc7e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
9 changes: 3 additions & 6 deletions Initialize/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ $itt = [Hashtable]::Synchronized(@{

})

$currentPid = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$principal = [System.Security.Principal.WindowsPrincipal]$currentPid
$administrator = [System.Security.Principal.WindowsBuiltInRole]::Administrator

if (-not $principal.IsInRole($administrator))
# Ask user
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
$newProcess = Start-Process -FilePath "PowerShell" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -Command `"$($MyInvocation.MyCommand.Definition)`"" -Verb RunAs
exit
Expand All @@ -47,7 +44,7 @@ try {
$Host.UI.RawUI.WindowTitle = "ITT - #StandWithPalestine"
}
catch {
Write-Warning "Media player not loaded because you're using Windows Lite or have disabled it."
Write-Warning "Media player not loaded because you're using Windows Lite or have disabled."
}

if (-not (Test-Path -Path $itt.ittDir)) {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,5 @@ English

<h2>🔑 Keywords</h2>

`itt, Install Tweaks Tool, windows10debloater, windows11debloater, windows-optimization, Application Installation, System Optimization, Windows Tools, Automation, System Customization, Software Updates, Silent Installers, PowerShell Scripts, Developer Tools, Game-engine, godotengine, godot, Windows Applications, windows-tweaks, disable-windows-updates, Open-Source, activator-windows, windows-optimization-tool, tweaks, tweaker, Privacy, StandWithPalestine, Security, privacy-policy, choco, winget, download, emadadel, emadadel4`
`itt, Install Tweaks Tool, windows10debloater, windows11debloater, windows-optimization, Application Installation, System Optimization, Windows Tools, Automation, System Customization, Software Updates, Silent Installers, PowerShell Scripts, Developer Tools, Game-engine, godotengine, godot, Windows Applications, windows-tweaks, disable-windows-updates, Open-Source, activator-windows, windows-optimization-tool, tweaks, tweaker, Privacy, StandWithPalestine, Security, privacy-policy, fmhy, choco, winget, download, emadadel, emadadel4`

9 changes: 3 additions & 6 deletions itt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ $itt = [Hashtable]::Synchronized(@{

})

$currentPid = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$principal = [System.Security.Principal.WindowsPrincipal]$currentPid
$administrator = [System.Security.Principal.WindowsBuiltInRole]::Administrator

if (-not $principal.IsInRole($administrator))
# Ask user
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
$newProcess = Start-Process -FilePath "PowerShell" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -Command `"$($MyInvocation.MyCommand.Definition)`"" -Verb RunAs
exit
Expand All @@ -62,7 +59,7 @@ try {
$Host.UI.RawUI.WindowTitle = "ITT - #StandWithPalestine"
}
catch {
Write-Warning "Media player not loaded because you're using Windows Lite or have disabled it."
Write-Warning "Media player not loaded because you're using Windows Lite or have disabled."
}

if (-not (Test-Path -Path $itt.ittDir)) {
Expand Down
2 changes: 1 addition & 1 deletion templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,4 @@ English

<h2>🔑 Keywords</h2>

`itt, Install Tweaks Tool, windows10debloater, windows11debloater, windows-optimization, Application Installation, System Optimization, Windows Tools, Automation, System Customization, Software Updates, Silent Installers, PowerShell Scripts, Developer Tools, Game-engine, godotengine, godot, Windows Applications, windows-tweaks, disable-windows-updates, Open-Source, activator-windows, windows-optimization-tool, tweaks, tweaker, Privacy, StandWithPalestine, Security, privacy-policy, choco, winget, download, emadadel, emadadel4`
`itt, Install Tweaks Tool, windows10debloater, windows11debloater, windows-optimization, Application Installation, System Optimization, Windows Tools, Automation, System Customization, Software Updates, Silent Installers, PowerShell Scripts, Developer Tools, Game-engine, godotengine, godot, Windows Applications, windows-tweaks, disable-windows-updates, Open-Source, activator-windows, windows-optimization-tool, tweaks, tweaker, Privacy, StandWithPalestine, Security, privacy-policy, fmhy, choco, winget, download, emadadel, emadadel4`

0 comments on commit 330fc7e

Please sign in to comment.