Forum Discussion

AB21805's avatar
AB21805
Bronze Contributor
Apr 19, 2023
Solved

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...
  • AB21805's avatar
    Apr 21, 2023
    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

Resources