Here is an interesting way to create a shortcut on the desktop, with a custom icon, and even an optional hotkey. The "standard" shortcut is a file with the .lnk extension, and the format has not been officially documented for us by m$. Creating such a file from vb can be done, but not very conveniently.

However, we can create a shortcut of a different type, which seems to work pretty much the same as far as I can tell. This technique uses the "internet shortcut" file format, which you will recognize as nothing more than a simple text file in the same arrangement as an INI file. The extension is ".url", but it can work for programs as well as documents and other files. As with typical shortcuts, non-executables will be opened by the program with which that file type is associated. You can specify much of the same parameters as a "normal" shortcut, but here I'm using just a few.

This is what the file might look like:
Code:
[InternetShortcut]
URL=file://C:\Program Files\MyProgram\Myexe.exe
IconFile=C:\Program Files\MyProgram\Myexe.exe
IconIndex=0
HotKey=1392
If you don't designate the icon of your choice, the icon will be the one which is normally used for internet shortcuts.
The hotkey is the same as any shortcut, and is determined as follows:

The virtual key code is in the low-order byte, and the
modifiers are in the high-order byte. The modifiers
can be a combination of the following:
1 = SHIFT
2 = CTRL
4 = ALT

So, the hotkey I used in the above example is Shift+Alt+F1. This works even from within applications, so if you include this parameter, you should try to avoid hotkeys which may be used elsewhere.

That's basically all there is to it! A few simple Print statements can create the file. Just remember to give it the .url extension. I'd suggest using SHGetSpecialFolderLocation to locate the desktop.