You've probably found it by now (it's been 2 years since you posted) but I'll write it down for others who may be looking for it :
my $LINK=new Win32::Shortcut();
$LINK->Set("c:\\yourprogramname",
"list of arguments",
"c:\\wherever you want it to run from",
"description",
1, #window state (1 is normal)
hex('55x0337'), #shorcut key*
"",#icon file eg win32.dll
0);#icon number in file
$LINK->Save("c:\justaname.lnk");
$LINK->Close();
* shortcut key : it's 2 bytes followed by the key's code (for example 0337 is Q). The first 2 bytes give you the mode but I didn't find any info on the web - all I read was that no one knew how it worked. I'm still looking for that piece of info though.
For extra information you can go to
http://search.cpan.org/src/GSAR/libwin32-0.191/Shortcut/docs/reference.html
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.