If you check out the source of MSI::Installer.pm's SetShortcut() method and you will see:

$self->{msi_db}->AddData(Shortcut => [ {'Shortcut' => StrToUKey($target_file +), 'Directory_' => $dir_key, 'Name' => $shortcut_name, 'Component_' => $component, 'Target' => $Feature, 'Arguments' => $argument_str, 'Description' => 'Description', 'Hotkey' => undef, 'Icon_' => undef, 'IconIndex' => undef, 'ShowCmd' => undef, 'WkDir' => undef, }],

If you have a look here you will see the property names associated with shortcuts objects in VBS. You can see the WorkingDirectory property. I strongly suspect that 'WkDir' in the above code corresponds to this. So just hack the Installer.pm source to take a 4th arg and use it to set 'WkDir'. With a bit of luck it should work. For reference here is a VBS example of creating shortcuts which shows you the object property names. In a worst case you could always run something like this to generate the required shortcut.

' Get a Shell object Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") ' Create a shortcut object Dim MyShortcut Set MyShortcut = WSHShell.CreateShortcut("C:\Temp\Shortcut.lnk") ' Set shortcut object properties and save it MyShortcut.TargetPath = "\\server\xyz\foo.exe" MyShortcut.WorkingDirectory = "\\server\xyz" MyShortcut.WindowStyle = 4 MyShortcut.Save

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Active Perl Dev Kit by tachyon
in thread Active Perl Dev Kit by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.