AutoHotkey Community

It is currently May 27th, 2012, 11:34 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: November 4th, 2011, 4:05 pm 
Offline

Joined: February 6th, 2007, 12:30 am
Posts: 142
Location: Michigan
Thanks... that helps clear things up. :)

_________________
http://www.panofish.net


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2011, 10:15 pm 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
I'm wanting to use this in an XP environment, where the user is a Power User. I use a compiled script, and my code is below:

Code:
RunAsAdmin()

Run, cscript.exe ToggleNIC.wsf, Hide
ExitApp

However, when I run it as a generic user, it still prompts me for a admin password. I want it to just work and elevate itself. How can I get around this?

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2011, 11:08 pm 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
I assume you're running Vista/7.

The script has the same rights as the user who ran it.

If you run it as a "generic user" then it will have the same rights as that user, and cannot be elevated to administrator all by itself if you have UAC turned on. This is a security feature.

This script only asks for administrator rights. If the only way windows will give it admin rights is to ask for an admin password then that's what's going to happen.

_________________
Scripts - License


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2011, 12:24 am 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
No, I want to run this on a Windows XP machine. It will be run by a generic user. It needs to run with administrator privileges as it will enable/disable the wifi adapter.

If this will not work, any ideas as to what might? Nothing in my research is finding something like this.

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2011, 2:25 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You have to realize what you're asking. You want something tha bypasses security restrictions and spontaneously elevates itself. Do you understand that if that were possible, all kinds of malware would use it?

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2011, 6:01 am 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
Yes and no. I want it to do that but I have the credentials I can supply the script itself to have that admin access. My thought is to have it authenticate, elevate then run. Perhaps this isn't the right function to look at, but I'm open to suggestions.

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2011, 1:36 pm 
Offline

Joined: June 3rd, 2008, 7:34 pm
Posts: 86
Location: Italy
You have to use a different approach for something like that.

You can give the generic user the power to run an executable as administrator. Give a look at runasSpc http://www.robotronic.de/runasspcEn.html

_________________
All my scripts/snippets are released under the WTFPL: http://sam.zoy.org/wtfpl/COPYING


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSN [Bot], nomissenrojb and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group