Apr 19 2023 07:18 AM
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\Desktop\RemoteApp.url"))
{
$null = $WshShell = New-Object -comObject WScript.Shell
$path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\wordpad.url"
$targetpath = "C:\Program Files\Windows NT\Accessories\wordpad.exe"
$iconlocation = "C:\Program Files\Windows NT\Accessories\wordpad.exe"
$iconfile = "IconFile=" + $iconlocation
$Shortcut = $WshShell.CreateShortcut($path)
$Shortcut.TargetPath = $targetpath
$Shortcut.Save()
Add-Content $path "HotKey=0"
Add-Content $path "$iconfile"
Add-Content $path "IconIndex=0"
}
How do I stop it from opening up on start up since I used the above script from intune.
I want to remove it from start up via intune / powershell too.
Any ideas?
Apr 21 2023 01:41 AM
SolutionApr 21 2023 01:41 AM
Solution