in reply to Write file in Windows Programs folder

Just in case you are hand coding an installer for a Perl application, let me point you to Win32::Packer.
  • Comment on Re: Write file in Windows Programs folder

Replies are listed 'Best First'.
Re^2: Write file in Windows Programs folder
by Anonymous Monk on Jan 25, 2018 at 10:06 UTC

    Hi, the most correct way to get the "ProgramFiles" Folder would be

    to use Win32::GetFolderPath(FOLDER), where FOLDER is the constant CSIDL_PROGRAM_FILES.

    And yes, it is true that Administrator rights are necessary to write to this Folder, so you have to start your perl program "as Administrator".

    A warning: If you try to write an Installation program using perl, don't do this!

    Use some kind of open source Software like NSIS or WIX to create an Installation package.

      Use some kind of open source Software like NSIS or WIX to create an Installation package

      That's actually what Win32::Packer does. It builds an MSI installer for the Perl application using WIX.

Re^2: Write file in Windows Programs folder
by Anonymous Monk on Jan 25, 2018 at 18:34 UTC

    I'll give definitively a try! I'll need to package scripts in exe/msi in the next future, and I am trying several ways.