KaFu Posted January 29, 2009 Share Posted January 29, 2009 (edited) Hello Forum, does anyone know, how to invoke windows standard RunAs dialog? I know of RunAs() for course, but i want to start the build-in dialog. Have search for something like a shell32.dll call without luck. Best Regards Edited January 29, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Zohar Posted January 29, 2009 Share Posted January 29, 2009 I am sure it is possible to call it via Run(), and If I was you I would search for it via google. If you don't find however, you can always use CODE Send("{LWin}") Send("{R}") Link to comment Share on other sites More sharing options...
KaFu Posted January 29, 2009 Author Share Posted January 29, 2009 Be sure that I did that . I don't mean the Run dialog, but the RunAs dialog. Thanks for your answer. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
trancexx Posted January 29, 2009 Share Posted January 29, 2009 Hello Forum, does anyone know, how to invoke windows standard RunAs dialog? I know of RunAs() for course, but i want to start the build-in dialog. Have search for something like a shell32.dll call without luck. Best RegardsThat dialog is for the program so you don't just invoke it like some other stuff. What you need is function ShellExecute from shell32.dll But AutoIt has that as built-in function allowing you to do something like this: MsgBox(64, "Normal mode", "IsAdmin: " & IsAdmin() & @CRLF & "Will go to elevated mode after you click OK") ShellExecuteWait(@AutoItExe, '/AutoIt3ExecuteLine "MsgBox(64, ''Elevated mode'', ''IsAdmin: '' & IsAdmin())"', @ScriptDir, "runas") MsgBox(64, "Normal mode again", "IsAdmin: " & IsAdmin() & @CRLF & "UAC again follows") ShellExecuteWait(@AutoItExe, '/AutoIt3ExecuteLine "MsgBox(64, ''Elevated mode again'', ''IsAdmin: '' & IsAdmin())"', @ScriptDir, "runas") Results depends on your current status, your choices and OS. Of course that you can run other programs like this. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
KaFu Posted January 29, 2009 Author Share Posted January 29, 2009 Perfect, that's what I was searching for ... ShellExecute(@ComSpec,'/k',@ScriptDir,'runas') Want to use it to allow the user to invoke any exe this way from SMF's result report. Verb 'runas' is not in the documentation . Thanks a bunch for this one Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
gilgul Posted April 24, 2013 Share Posted April 24, 2013 Dialog not appear in WIn7. How make it in Win7? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 25, 2013 Moderators Share Posted April 25, 2013 Gilgul, please do not resurrect a 4 year old thread. AutoIt is constantly evolving, and what may have worked in 2009 may be completely different today. Please open a new thread and describe in detail what you're trying to accomplish; I guarantee you will get a much better response. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 25, 2013 Moderators Share Posted April 25, 2013 gilgul, JLogan3o13 makes a good point - please do not do something like this again. But welcome to the AutoIt forums anyway. In response to the report, If the necro-question is self-contained and so can be split off easily, then by all means report it - if not (as in this case) it makes little sense to split it, so just comment in the thread for the poster's future wisdom. Thanks for your cooperation. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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