Using perl script for Windows without installing ActivePerl?

I use Perl as my scripting language of choice for Windows, and usually I just install ActivePerl (mostly 5.8 for personal sources) and do with it.

Now I am faced with the problem that I want to use small scripts on a machine where I do not have administrator rights and therefore can not install the ActiveState distribution with its installer.

What needs to be done in order to link with the installed ActiveState Perl in order to install the xcopy-style Perl in Windows? (And what environment variables should be set in the shell to make it work?)

+4
source share
6 answers

Strawberry Perl has a portable edition. I would use this to try to hack ActivePerl while working without a proper installation.

+13
source

You can install ActivePerl without administrator rights, using the installer of the * .zip file instead of * .msi. Download ActivePerl 5.12.3 from the download directory and run the installer.bat file in the root of the extracted tree.

+4
source

PAR::Packer allows you to pack perl along with your scripts and modules, depending on this, in a stand-alone executable. You might want to double check the ActiveState license terms to make sure that this type of distribution is allowed.

+2
source

Strawberry Perl from David's answer may be a better solution as it officially supports xcopy installation.

However, now I just tried to copy the installation directory to C:\Perl ActiveState and when C:\Perl\bin added to PATH , it looks like my script (s) is just fine.

Obviously, you should run scripts with __> perl file.pl , since there is no file association for Windows to know how to call only __> file.pl , as it would be when using the installed version, but you should always do this using xcopy-installs.

I also reviewed the MSI installer from ActiveState (for 5.8) and only contains files that are installed on TARGETDIR\Perl , so I think that just copying the Perl directory should also be safe for ActiveState.

+1
source

From what I hear, ActivePerl can be difficult to handle this way. However, I found this in perlmonks:

http://www.perlmonks.org/?node=Portable%20perl%3A%20usb%20thumbdrive

In short: Guy wants perl on windows without administrator rights, so he does thumbdrive usb, which does the job.

0
source

Here is the link where you can get the portable version of perl. http://strawberryperl.com/releases.html

Here are some explanatory notes from the page where you can configure various installation files. e.g. MSI, ZIP, etc.

MSI installer = preferred method, requires administrator rights to install

ZIP edition = administrator privileges are not required, however you need to run some scripts after manual installation after unzipping

PortableZIP edition = suitable for "perl on a USB stick" (you can move / rename the perl directory and it will work anyway)

MSM merge = module for advanced users who want to create their own MSI based on Strawberry Perl

DDrive edition = (not used since 5.12 series) special version with installed installation path to d: \ strawberry

0
source

All Articles