I want to create a shortcut with PowerShell for this executable:
C:\Program Files (x86)\ColorPix\ColorPix.exe
How can this be done?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know any native cmdlet in powershell but you can use com object instead:
you can create a powershell script save as set-shortcut.ps1 in your $pwd
and call it like this
If you want to pass arguments to the target exe, it can be done by:
before $Shortcut.Save().
For convenience, here is a modified version of set-shortcut.ps1. It accepts arguments as its second parameter.