Sign in to follow this  
Followers 0
2Radon

BlockInput() and admin rights - how to make it not ask every time?

8 posts in this topic

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.

Share this post


Link to post
Share on other sites



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 ;)


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

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 Gude
How 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

Share this post


Link to post
Share on other sites

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... :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Nothing is secure enough in this world.

 

What has been made can be unmade.

Share this post


Link to post
Share on other sites

Does anyone have a solution to this topic?

Share this post


Link to post
Share on other sites

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.

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