Forum Discussion

AB21805's avatar
AB21805
Bronze Contributor
Nov 09, 2022

opening exam write pad app on start up via intune

Hi all

 

I am using this to try opening the app on start up however I have had no luck! 

 

#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:\Program Files\ExamWritePad\ExamWritePad.url"
$targetpath = "C:\Program Files\ExamWritePad\ExamWritePad.exe"
$iconlocation = "C:\Program Files\ExamWritePad\ExamWritePad.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"
}
 
 
Any ideas?
 
 
  • changing path to $path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ExamWritePad.url"
  • changing path to $path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ExamWritePad.url"

Resources