in reply to Perl & Window's system stuff: Can they get along?

To open long filenames with spaces enbedded use single quotes.

To make a shortcut use Win32::Shortcut, it comes standard with the ActiveState distrubution.

To find out the system path I probably wouldn't do it through perl I would probably use a system call to the Dos shell and use the Enviromental Variables there it would be much easier to access. Otherwise the only way I can think of off hand is to use Win32::TieRegistry or Win32::Registry.

great sources of Win32 info is http://perl.dada.it or David Roth's Site Roth has written many Win32 modules and has several very good book on the subject on programming and administrating a Win32 environment. Be careful his books aren't intended for the novice they assume a solid understanding of perl's core functions.

  • Comment on Re: Perl & Window's system stuff: Can they get along?

Replies are listed 'Best First'.
Re: Re: Perl & Window's system stuff: Can they get along?
by myocom (Deacon) on Mar 19, 2001 at 07:32 UTC

    On an NT-based system, there's no need to do a system call to the shell to determine the Windows directory. $ENV{windir} (or $ENV{SystemRoot}) has it.

    Update: As pointed out below, $ENV{windir} works on 9x systems as well.

      $ENV{'windir'} also works fine on 9x.
      In 9x the start menu can be found in the registry :
      'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Start Menu'
      I dont know about NT/2k, but it should be the same. hope this helps you
      Braindead One
        Just wondering:

        Is the only way to read the windows registry with the Win32::TieRegistry module oribital mentions, or is there an even more straigtforward way?