@theopenem_admin said in Non-working shortcut when created via Toec:
I suspect that wscript.shell needs a user context instead of service.
Interesting enough, the following works fine in Toec to create a Chrome shortcut pointing to a specific web site.
$shell = New-Object -comObject WScript.Shell
$shortcut = $shell.CreateShortcut("C:\Users\Public\Desktop\ETA Test Site - Chrome.lnk")
$shortcut.TargetPath = "C:\Program Files\Google\Chrome\Application\chrome.exe"
$shortcut.Arguments = "https://www.eta-i.org"
#$shortcut.WorkingDirectory = ""
$shortcut.Save()