Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Creating a shortcut as a PIF

$
0
0

Hello,

I am trying to create a shortcut however I need the shortcut to be created as a .PIF.

Currently I am using the following which will create a shortcut however I cannot get it to work as a .pif as its not supported.


$WshShell = New-Object -comObject WScript.Shell
$Shortcut.TargetPath = "$home\Desktop\Test\Program.exe"
$Shortcut = $WshShell.CreateShortcut("$home\Desktop\Test\Something.lnk")
$Shortcut.Save()

Any thoughts or suggestions on how to create this in powershell is much appricated!


Viewing all articles
Browse latest Browse all 6937

Trending Articles