Hello - newbie here
I am trying to create a desktop shortcut to open in Chrome despite the default browser.
I want http://workday.com to open in Chrome no matter what…
Can someone literally spell out the script for me…I tried myself with no luck.
Please and Thank You.
This is not really a BigFix question, but it happens to be an easy answer.
Create a shortcut with target "C:\Program Files\Google\Chrome\Application\chrome.exe" https://workday.com/
Copy that .LNK shortcut to the all users desktop.
If you have Chrome in a non-default location, you will have to accommodate that.
Thank you for your response. Let me clarify that I am trying to create a fixlet to do this. So I have the .lnk file but when I try to upload it into bigfix it’s trying to upload the chrome.exe file.
Then I tried a different method using powershell:
createfile until -end-
$Shell = New-Object -ComObject (“WScript.Shell”)
$ShortCut = $Shell.CreateShortcut($env:USERPROFILE + “\Desktop\Workday Learning.lnk”)
$ShortCut.TargetPath=“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”
$ShortCut.Arguments=“https://workday.com ”
$ShortCut.Save()
-end-
copy __createfile C:\Scripts\create_shortcut.ps1
wait powershell.exe -ExecutionPolicy Bypass -File “C:\Scripts\create_shortcut.ps1”
The fixlet completes as “Fixed” but the shortcut is not there.
Thanks for your help.
1 Like
SLB
August 14, 2021, 11:26pm
4
The action will run in the SYSTEM context so $env:USERPROFILE is the SYSTEM profile not all users or the current user. Try using the PUBLIC environment
1 Like