Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/F0903/AutoPower
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 10, 2024
2 parents 37a859f + 2a962b1 commit 638ca32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion start_service.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
Assert-Admin($MyInvocation.MyCommand.Definition)

sc.exe start $ServiceName
Start-Process -FilePath $ProxyPath -ErrorAction Stop
Start-Process -FilePath $ProxyPath -ErrorAction Stop
Write-Host "Success!"
Write-Host "It's recommended to restart your system as it otherwise sometimes won't work reliably."
Write-Host "Press any key to exit..."
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
1 change: 1 addition & 0 deletions variables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function Assert-Admin($script_definition) {

if (-not $IsAdmin) {
Write-Output "Starting a new shell as admin..."
Write-Output "Sometimes this window will stay open even after install is finished."
Start-Process "powershell" -Wait -Verb RunAs -ArgumentList ('-ExecutionPolicy Bypass -noprofile -file "{0}" -elevated' -f ($script_definition))
exit
}
Expand Down

0 comments on commit 638ca32

Please sign in to comment.