Advertisement
Guest User

ShitTheDesktop

a guest
Mar 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.     For when you need links to all files in System32 on your desktop.
  3. #>
  4. $ErrorActionPreference:SilentlyContinue
  5. $HomeDrive = $env:HOMEDRIVE
  6. $HomePath = $env:HOMEPATH
  7. $Desktop = $HomeDrive + $HomePath + "\Desktop\"
  8. $Poop = Get-ChildItem -Path C:\Windows\System32 -File | % { $_.FullName }
  9. Foreach ($PooParticle in $Poop) {
  10.     $Poopy = $PooParticle | Split-Path -Leaf
  11.     $PooClone = $Desktop + $Poopy + ".lnk"
  12.     $Shovel= New-Object -ComObject WScript.Shell
  13.     $ShovelShit = $Shovel.CreateShortcut($PooClone)
  14.     $ShovelShit.TargetPath = $PooParticle
  15.     $ShovelShit.Save()
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement