topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 5:00 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Shortcut to launch with admin privileges?  (Read 9582 times)

kli6891

  • Honorary Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Read more about this member.
    • Donate to Member
Shortcut to launch with admin privileges?
« on: November 15, 2009, 10:14 PM »
In start menu search, there is a handy ctrl+shift+enter to launch the selected program with admin. rights. Is there such a shortcut in FARR?


Thanks.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #1 on: November 15, 2009, 10:22 PM »
I had no idea about that shortcut, but it's a great idea to add it to farr. i will make it so that if you hold ctrl+shift when you trigger a result it will launch it with admin privileges. adding to todo list.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #2 on: November 16, 2009, 01:08 AM »
tip: ShellExecute using the "RunAs" verb. Not properly documented and feels hacky, but that's the UAC API for you, I guess :(
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #3 on: November 20, 2009, 10:55 AM »
Done, implemented in v 2.80.01; hold ctrl+shift when triggering an item to run as admin; for alias results you can also indicate a result should be run as admin with /runasadmin option.

ps. thanks for the tip f0dder.  :up:

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #4 on: November 20, 2009, 01:32 PM »
tip: ShellExecute using the "RunAs" verb. Not properly documented and feels hacky, but that's the UAC API for you, I guess :(
As I recall, RunAs (in Shell & ShellExecute) was an option back in Win2k, it just never caught on because everybody just ran as Admin back then.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #5 on: November 20, 2009, 05:46 PM »
tip: ShellExecute using the "RunAs" verb. Not properly documented and feels hacky, but that's the UAC API for you, I guess :(
As I recall, RunAs (in Shell & ShellExecute) was an option back in Win2k, it just never caught on because everybody just ran as Admin back then.
It was?

Thing is, the undocumented "RunAs" UAC thing in ShellExecute doesn't take any user credentials - so imho it's extremely misnamed.
- carpe noctem

putnum

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 68
    • View Profile
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #6 on: April 13, 2010, 09:45 AM »
Hi is there a way to pass the username and password to the /runsasadmin switch automatically?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #7 on: April 13, 2010, 04:26 PM »
there is no way currently, but it's an interesting idea.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #8 on: April 13, 2010, 07:45 PM »
Well... While I was beating the web bushes for a bit more elegant solution to the SetSystemTime debacle (hehe) I ran across this tutorial series that looks to be right about what you're after (Replete with Code Samples):

Asking the User for Credentials

anabus

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #9 on: May 14, 2010, 11:51 AM »
Done, implemented in v 2.80.01; hold ctrl+shift when triggering an item to run as admin; for alias results you can also indicate a result should be run as admin with /runasadmin option.

ps. thanks for the tip f0dder.  :up:

This seems to work when triggering an item using Ctrl+Shift+Enter, but it doesn't seem to work for Ctrl+Shift+Numpad #. Is this not how it's implemented (and I'm just doing it wrong), or is it supposed to work?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Shortcut to launch with admin privileges?
« Reply #10 on: May 14, 2010, 04:35 PM »
thanks for the report -- i'll check -- sounds like i just forgot to handle that case.