Sign in to follow this  
Followers 0
moldor

Noobie Request

3 posts in this topic

Hi all - I've just started using AutoIT and need a little help with something. First, some background;

The company I work for (a Bank in Australia) has, as you would expect, locked their machines down pretty tightly - even the ones we IT Support staff use. Many Control Panel and Service functions are no longer available to us unless with use our "super user" account, even on our own machines.

To help a couple of the more junior staff with certain things, what I need to create is a menu system that will allow various *.cpl and *.msc files to be called, while parsing the user's admin credentials at the same time.

I'm not asking anyone to write it for me, but if someone could point me in the right direction it would be greatly appreciated.

Jon (aka "moldor the flatulent" - no, don't ask !!!)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

As far as the running of files go, check the section ShellExecute()

http://www.autoitscript.com/autoit3/docs/functions/ShellExecute.htm

IE

HotKeySet("{F9}", "_Run") ; Assign a hotkey to quickly utilize the run feature

Func _Run() ; Create a function (class) pertaining to the HotKey set previously
    ShellExecute("diskmgmt.msc") ; Run the Disk Management 
EndFunc ; Close out the function

While 1 ; Create a While loop to keep the script/program running until the user closes it
    Sleep(10)
WEnd ; Close the While loop

Of course, if you go this route using just one function for one program (Diskmgmt) isn't very organized. I would say do a Inputbox that requests which program they want to run and all they do is type it in. Or even create a GUI to hold a list of all available programs and they can select via that.

For parsing the account info, if its something as simple as typing in the credentials that should be easy for making it so you can by-pass that I'm not sure. Maybe if you run the .exe elevated it seems to me like you wouldn't need to verify any rights.

Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites

hello moldor, welcome to AutoIt and to the forum!

as i see it, what you need is simply a GUI wrapper for "Run As"

have a look here:

'?do=embed' frameborder='0' data-embedContent>>

this is an example of GUI for end-user to enter credentials and select network shares from a list; then the script maps drives to the selected servers shares. you can easily substitute the servers list with commands list, and change the action from "map" to "run as".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0