Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 118191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:27:20+00:00 2026-05-11T03:27:20+00:00

How can one pass command line arguments via file association in Vista 64? I

  • 0

How can one pass command line arguments via file association in Vista 64?

I recently built a PC running Vista Ultimate 64-bit. I noticed several of the Perl scripts I transferred failed due to command-line arguments not being passed. As a simple test, I wrote the following (foo.pl):

#!/usr/bin/perl -w use strict; my $num_args = $#ARGV + 1; print '${num_args} arguments read\n'; print '$^X\n' # to see what was being used 

Running ‘foo.pl 1 2 3’ undesirably yielded:

0 arguments read C:\strawberry\perl\bin\perl.exe 

Running ‘perl foo.pl 1 2 3’ expectedly yielded:

3 arguments read C:\strawberry\perl\bin\perl.exe 

On my old Windows XP PC, both invocations returned 3 arguments. I documented more of my sleuthing here (win32.perl.org wiki talk), but I’ve yet to find a solution that works.

I’ve also tried ActivePerl-5.10.0.1004-MSWin32-x64-287188.msi to no avail.

Any help would be appreciated. This is driving me batty.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:27:21+00:00Added an answer on May 11, 2026 at 3:27 am

    I just tried ActivePerl-5.10.0.1004-MSWin32-x64-287188.msi on my Vista 64 Ultimate and it worked.

    F:\prog\perl>foo.pl 1 2 3 3 arguments read C:\Perl64\bin\perl.exe 

    That means devio is right: it must be an ‘file association’ issue;

    On an explorer, right-click on your .pl file and ask ‘Open with’: use the ‘Perl Command Line interpreter’ and it will work (and select ‘always use this program to open this type of file’).

    To me, ‘Vista’s file extension manager removed the ability to pass arguments to functions’ seems wrong…


    I do see:

    Windows Registry Editor Version 5.00  [HKEY_CLASSES_ROOT\Perl\shell\Open\command] @='\'C:\\Perl64\\bin\\perl.exe\' \'%1\' %*' 

    Meaning if your installation did not put that kind of value in your registry, it is because:

    • you did not select the association during the setup of ActivePerl-5.10.0.1004-MSWin32-x64-287188.msi
    • or your account has not enough privilege to write anything in the registry.

    Note:

    • it seems the regular extension manager on Vista does not pass argument (meaning \'C:\\Perl64\\bin\\perl.exe\' \'%1\' without the %* argument)
    • the registry addition is necessary as documented by the SO
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 79k
  • Answers 79k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It should be "source.Execute(scope);" instead of "source.Execute();" May 11, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer DOMAIN_A.LOCAL must trust DOMAIN_B.LOCAL, otherwise users from DOMAIN_B.LOCAL will receivie… May 11, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer What you are trying to do is a P/Invoke. You… May 11, 2026 at 4:06 pm

Related Questions

Further to How to Pass Command Line Parameters in batch file how does one
A quick couple of Cygwin questions that I am not quite sure how to
I am writing a command-line tool for Windows that uses libcurl to download files
I'm working on scripts that apply database schema updates. I've setup all my SQL

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.