Created
May 15, 2022 19:28
-
-
Save nhtzr/796fe9760bea44e6d45813f14a32a1f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function su { | |
Start-Process powershell.exe -Verb RunAs -Args "-executionpolicy bypass -noexit -command Set-Location \`"$PWD\`"; `$env:Path += \`";$env:USERPROFILE\scoop\shims\`"; `$env:SCOOP = \`"$env:USERPROFILE\scoop\`"; `$env:XDG_CONFIG_HOME = \`"$env:USERPROFILE\.config\`"; `$env:SCOOP_STARTMENU = \`"$([Environment]::GetFolderPath('startmenu'))\`"; $args; robocopy `$([System.IO.Path]::Combine([Environment]::GetFolderPath('startmenu'), 'Programs', 'Scoop Apps'))` `$([System.IO.Path]::Combine(`$env:SCOOP_STARTMENU`, 'Programs', 'Scoop Apps', 'Admin'))` *.lnk /XO /PURGE;" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from ScoopInstaller/Extras#3269