Normally you can create a shortcut to a printer from right click menu of printer itself.
Is there any other way around?
I tried using IWshShortcut with following parameter as targetpath
"Control Panel\Hardware and Sound\Devices and Printers\MyPrinter"
It creates a shortcut but its not valid
Any ideas
IWshShortcutcan't create a shortcut to a printer because it supports only file system targets. To create a shortcut to a printer requires digging into the shell namespace, which is a very advanced topic. You need to get theLPITEMIDLISTfor theFOLDERID_PrintersFolder, bind to that folder to get theIShellFolder, useIShellFolder::EnumObjectsto enumerate the printers, decide which printer you like (perhaps by inspecting its name withIShellFolder::GetDisplayNameOf), and then useIShellLink::SetIDListto target a shell link to that printer. I gave you the magic words so you can do some searches and learn more about them, but I'm not going to try to teach the shell namespace on SO.