in reply to Re^4: Windows 7 UAC with elevated privileges
in thread Windows 7 UAC with elevated privileges

Ah! I see what you mean. @ARGV isn't actually the OS-level arguments passed to the interpreter because there's some logic before that.

Excellent - thank you! I'll put that into the next version. I figured that simplistic handling of the command line was probably going to be a problem, but I had no idea it was that weird...

  • Comment on Re^5: Windows 7 UAC with elevated privileges

Replies are listed 'Best First'.
Re^6: Windows 7 UAC with elevated privileges
by Anonymous Monk on Apr 26, 2014 at 21:48 UTC
    :) You might also want to warn (in the docs) to add the  use Win32::RunAsAdmin qw(force); as soon as possible ... in case some other modules change cwd :) as PL_origargv doesn't track cwd :)

      Hey - I just wanted to thank you again. If you hadn't forced me to understand what you were saying, I would have had no idea where to start looking when I used Win32::RunAsAdmin (without force) and Getopt::Euclid to determine based on a command-line flag whether to request elevated privileges or not.... and the command line disappeared (!) As it was, it was obvious what had happened.

      Anyway, v0.02 is up. Thanks.