Mar 01 2022 04:16 AM
Hi all,
How do I set it so when users log in word pad opens or set it so on specific accounts word pad opens
Thanks in advance
Mar 01 2022 06:25 AM - edited Mar 01 2022 06:26 AM
I guess something like this...
#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\winword.url"
$targetpath = "C:\Program Files\Microsoft Office\root\Office16\winword.exe"
$iconlocation = "C:\Program Files\Microsoft Office\root\Office16\winword.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"
}
Mar 01 2022 11:14 PM
Mar 01 2022 11:28 PM
SolutionMar 02 2022 12:29 AM
Nov 09 2022 04:05 AM
Mar 01 2022 11:28 PM
Solution