moldor Posted April 3, 2014 Share Posted April 3, 2014 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 !!!) Link to comment Share on other sites More sharing options...
Damein Posted April 4, 2014 Share Posted April 4, 2014 (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 April 4, 2014 by Damein 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 Link to comment Share on other sites More sharing options...
orbs Posted April 4, 2014 Share Posted April 4, 2014 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". Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now