AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run Command on Windows Seven

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
kiu



Joined: 18 Dec 2005
Posts: 234
Location: Italy - Galatro(RC)

PostPosted: Fri Feb 12, 2010 5:25 pm    Post subject: Run Command on Windows Seven Reply with quote

is it possible to run a program without seeing the "Are you sure to execute...?" prompt?
_________________
____________________
______________________
kiu - www.romeosa.com
Back to top
View user's profile Send private message Visit poster's website
complx



Joined: 22 Jan 2010
Posts: 34
Location: Germany

PostPosted: Fri Feb 12, 2010 5:32 pm    Post subject: Reply with quote

You mean bypassing the UAC (user account control) implemented since Vista?

That can be done by using the task scheduler as a workaround. I can post a more detailed description, if I understood you right.

AHK won't help AFAIK. There would be not much security, if bypass UAC would be so easy. Very Happy
_________________
complx

“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown
Back to top
View user's profile Send private message
kiu



Joined: 18 Dec 2005
Posts: 234
Location: Italy - Galatro(RC)

PostPosted: Fri Feb 12, 2010 5:37 pm    Post subject: Reply with quote

How does the task scheduler workaround work?
_________________
____________________
______________________
kiu - www.romeosa.com
Back to top
View user's profile Send private message Visit poster's website
kiu



Joined: 18 Dec 2005
Posts: 234
Location: Italy - Galatro(RC)

PostPosted: Fri Feb 12, 2010 5:39 pm    Post subject: Reply with quote

An ahk workaround maybe the following, but it's not a good solution:

#Persistent
SetTimer, cc
cc:
IfWinExist, ahk_class #32770
ControlClick, Button1, ahk_class #32770
return
_________________
____________________
______________________
kiu - www.romeosa.com
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Fri Feb 12, 2010 5:41 pm    Post subject: Reply with quote

using task scheduler to run program is more troublesome than clicking YES in the UAC message box...
also, if u are talking about someone else computer, u wont have access to the task scheduler anyways, so that doesnt work
Back to top
Guest






PostPosted: Fri Feb 12, 2010 5:43 pm    Post subject: Reply with quote

kiu wrote:
An ahk workaround maybe the following, but it's not a good solution:

#Persistent
SetTimer, cc
cc:
IfWinExist, ahk_class #32770
ControlClick, Button1, ahk_class #32770
return


...if u are blindly going to approve any apps running, might as well disable UAC
Back to top
kiu



Joined: 18 Dec 2005
Posts: 234
Location: Italy - Galatro(RC)

PostPosted: Fri Feb 12, 2010 5:44 pm    Post subject: Reply with quote

so my previous one is the only possible solution?

I think there is more. For example, firefox can run an external program when you download a file and you don't get any message from the UAC.

Anyone knows how can firefox do it?
_________________
____________________
______________________
kiu - www.romeosa.com
Back to top
View user's profile Send private message Visit poster's website
Jeremiah



Joined: 20 Apr 2009
Posts: 797
Location: North Dakota, USA

PostPosted: Fri Feb 12, 2010 5:44 pm    Post subject: Reply with quote

Anonymous wrote:
if u are blindly going to approve any apps running, might as well disable UAC


Agreed.
_________________
-Jeremiah
Back to top
View user's profile Send private message Send e-mail MSN Messenger
complx



Joined: 22 Jan 2010
Posts: 34
Location: Germany

PostPosted: Fri Feb 12, 2010 6:10 pm    Post subject: Reply with quote

kiu wrote:
How does the task scheduler workaround work?

Okay here it comes
- excuse me, if I'm using wrong terms. I'm using a german Win7 so I might not guess the right term, when translating this back to english Wink :


    1. Create a new task (or maybe it's called job?) in the task scheduler.
    2. The key trick is to activate the checkbox "run with highest priveleges/rights"(?) (its the next to last checkbox on the first tab). This will bypass UAC
    3. Then you just need to specify an action (i.e. a the program you would like to call bypassing UAC). A trigger is NOT needed.
    4. To run the desired program, you now use the following command instead of your previous link:
    schtasks.exe /run /TN "<name of the task/job just created before>"


It's not a perfect solution since it's very time consuming to implement. I only use this for two or three programs need every day and which I trust (e.g. truecrypt).
_________________
complx

“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown


Last edited by complx on Fri Feb 12, 2010 6:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Feb 12, 2010 6:17 pm    Post subject: Reply with quote

kiu wrote:
so my previous one is the only possible solution?

I think there is more. For example, firefox can run an external program when you download a file and you don't get any message from the UAC.

Anyone knows how can firefox do it?

the first time to run any programs, UAC will pop up, after u approves it, it will never show up again.
same thing with AHK, if u compile the script, and approves the EXE, it shouldnt show up again
Back to top
complx



Joined: 22 Jan 2010
Posts: 34
Location: Germany

PostPosted: Sat Feb 13, 2010 11:29 am    Post subject: Reply with quote

Anonymous wrote:
[...]
the first time to run any programs, UAC will pop up, after u approves it, it will never show up again.[...]

Can't confirm that. UAC always asks for applications, e.g. try regedit - there's always a popup you've to approve. (using Win7 x64 home premium)
_________________
complx

“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group