How do I permanently change a shortcut's target path with perl script? -


i trying figure out perl's win32::shortcut module, , how change shortcut paths said module. personal project , plan manage shortcuts script

#!/usr/local/bin/perl  use win32::shortcut; use strict;  $link;  $link = new win32::shortcut(); $link->load("c:\\users\\jimbo\\desktop\\vlc media player.lnk"); $link->{'path'} = "http://www.google.com//";  $link->save(); $link->close(); 

the script runs without issue, when click on shortcut loaded opens vlc media player instead of google.com.

it may appear succeed didn't include error checking. try this:

$link->load("c:\\users\\jimbo\\desktop\\vlc media player.lnk") or die "$! ($^e)"; 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -