akm2 has asked for the wisdom of the Perl Monks concerning the following question:
I' using the following code to read the windows registry and create a startmenu shortcut accordingly.
sub MakeShortcut{ use Config; use Win32::API; use Win32::Shortcut; use Win32::TieRegistry; use strict; use Win32::TieRegisry ( Delimiter=>"/" ); my ($key); if ($configUser || Win32::IsWin95()) { $key = 'CUser/Software/Microsoft/Windows/CurrentVersion/Explor +er/Shell Folders//Programs'; } else { $key = 'LMachine/SOFTWARE/Microsoft/Windows/CurrentVersion/Exp +lorer/Shell Folders//Common Programs'; } my $folderdir = $Registry->{$key}; my $folderpath = "$folderdir\\$shortcutfoldername"; print "Creating shortcut folder $folderpath\n"; mkdir ($folderpath, 0777); print "Making shortcut Tk Solitaire\n"; my $LINK=new Win32::Shortcut(); $LINK->{'Path'}="\\Tk Solitaire\\Tk Solitaire.exe"; $LINK->{'Arguments'}=""; $LINK->{'WorkingDirectory'}=\\Tk Solitaire; $LINK->{'Description'}="Tk Solitaire"; $LINK->{'ShowCmd'}=SW_SHOWNORMAL; $LINK->Save("$folderpath\\Tk Solitaire.lnk"); $LINK->Close(); }
When I try to run the above code on my Windows2000 Advanced Server system using ActiveState ActivePerl version 5.6.0.623 I get the following error.
Can't locate Win32/TieRegisry.pm in @INC (@INC contains: E:/Perl/lib E +:/Perl/sit e/lib .) at link.pl line 8. BEGIN failed--compilation aborted at link.pl line 8.
I thought Win32::TieRegistry was included in the distribution of ActivePerl? What's wrong here?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Win32::TieRegistry
by tye (Sage) on Mar 31, 2001 at 21:56 UTC | |
by PsionicMan (Beadle) on Apr 01, 2001 at 00:31 UTC | |
by rchiav (Deacon) on Apr 01, 2001 at 10:28 UTC | |
|
Re: Win32::TieRegistry
by dws (Chancellor) on Apr 02, 2001 at 10:22 UTC |