SOLVED

opening exam write pad app on start up via intune

Bronze Contributor

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?
 
 
2 Replies
best response confirmed by AB21805 (Bronze Contributor)
Solution
changing path to $path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ExamWritePad.url"
1 best response

Accepted Solutions
best response confirmed by AB21805 (Bronze Contributor)
Solution
changing path to $path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ExamWritePad.url"

View solution in original post