Skip to content

Instantly share code, notes, and snippets.

@a5ync
Created April 20, 2016 00:46
Show Gist options
  • Save a5ync/3505765ef3b0ee08c100904534e82e90 to your computer and use it in GitHub Desktop.
Save a5ync/3505765ef3b0ee08c100904534e82e90 to your computer and use it in GitHub Desktop.
Add application to Windows auto-start (startup)
#update registry
Write-Host Adding to startup
$keyRun = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
$appToRun="C:\Windows\notepad.exe"
$label = "Hey Run Notepad"
Set-ItemProperty -Path $keyRun -Name $label -Value $appToRun
Write-Host Added to startup -foreground "green"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment