Forum Discussion
AB21805
Apr 19, 2023Bronze Contributor
Disable app from starting up
Hi all, I have set wordpad via powershell to open up on start up which I no longer need to I used: #Create shortcut in all users startup folder if (-not (Test-Path "C:\Users\Public\Desk...
- Apr 21, 2023I used # Specify the path of the WordPad shortcut in the startup folder
$shortcutPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\wordpad.url"
# Delete the WordPad shortcut if it exists
if (Test-Path $shortcutPath) {
Remove-Item $shortcutPath
Write-Output "WordPad removed from startup."
} else {
Write-Output "WordPad shortcut not found in startup folder."
}
in the end which worked
AB21805
Apr 21, 2023Bronze Contributor
I used # Specify the path of the WordPad shortcut in the startup folder
$shortcutPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\wordpad.url"
# Delete the WordPad shortcut if it exists
if (Test-Path $shortcutPath) {
Remove-Item $shortcutPath
Write-Output "WordPad removed from startup."
} else {
Write-Output "WordPad shortcut not found in startup folder."
}
in the end which worked
$shortcutPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\wordpad.url"
# Delete the WordPad shortcut if it exists
if (Test-Path $shortcutPath) {
Remove-Item $shortcutPath
Write-Output "WordPad removed from startup."
} else {
Write-Output "WordPad shortcut not found in startup folder."
}
in the end which worked