2Radon Posted April 22, 2014 Posted April 22, 2014 Hello! How can I make my program ask for administrator rights only once and every time it is executed in future it remembers that? #RequireAdmin makes it ask every time, and going to the compiled executable file's properties under compatibility and checking run as administrator helps nothing at all. This is important because otherwise when using my program a user can simply open Notepad at the right time and catch it writing the password that must not be revealed.
Moderators JLogan3o13 Posted April 22, 2014 Moderators Posted April 22, 2014 You need to find another way of storing the password then. You're talking about an inherent security feature in Windows, and are asking how to circumvent that. Think about your request for a moment to consider how much help you're likely to receive "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!
BrewManNH Posted April 22, 2014 Posted April 22, 2014 Also, you shouldn't be using a script to send the password in the clear like that, it's very insecure. Using send is also very very unstable as almost anything can make it send to the wrong window, use ControlSend or ControlSetText instead so you know where the text is going. Also, an AutoIt script is not secure enough to store a password in. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
2Radon Posted April 23, 2014 Author Posted April 23, 2014 Also, you shouldn't be using a script to send the password in the clear like that, it's very insecure. Using send is also very very unstable as almost anything can make it send to the wrong window, use ControlSend or ControlSetText instead so you know where the text is going. Also, an AutoIt script is not secure enough to store a password in. Thank you for the ControlSend suggestion, I will change it to that later. Though, talking about security, can a person not create a control that has at least the necessary same identifiers as the control AutoIT program sends the password to and get it that way? Now I have a question related to this, why is not this working? RunAs(@UserName, @LogonDomain, "password", 4, "C:\Users\<user>\Desktop\CMD\Main\Project\MainForm.exe", "C:\Users\<user>\Desktop\CMD\Main\Project") ; I tried all four logon flags, no good. ; Obviously replaced real password and user with something else for showing here... :)
DatMCEyeBall Posted April 23, 2014 Posted April 23, 2014 Also, an AutoIt script is not secure enough to store a password in. Nothing is secure enough in this world. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation
2Radon Posted April 23, 2014 Author Posted April 23, 2014 Nothing is secure enough in this world. What has been made can be unmade.
orbs Posted April 24, 2014 Posted April 24, 2014 if you considered all that was said above about security, and you still insist on blocking input, then try BlockInpukEx() instead, it does not ask (me, at least) for admin rights. 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
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