caramen Posted November 9, 2011 Posted November 9, 2011 sry for my english i am doing my best Hello all i wanna make a script but before start anything i wanna plz know something I whant to do a script to install something and use my computer as a server to give the installation package to some users i whant to lunch something placed on my folder \\pc7506\c$\....\*\* when i will try to lunch the specified resource i will need to type a password and username of the windows logon account used to give the instalation package NOW my question is here: is there a way to give to the computer my password via autoit V3 without typing it ... this is a security question becose if someone can get my admin password during the script execution i just cant do that kind of thing... PS: i dont need any script work from you but just if you can give me a way to found what i need i will thank you all so much ... cya later and 1000 thx My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
caramen Posted November 9, 2011 Author Posted November 9, 2011 just an example of what i whant to do without typing * i wanna type in that windows my account and my password without typing it for the simple reson if the user click in an empty TXT file he will see what the script is typing http://www.hiboox.fr/go/images/sport/sans-titre,3d902378a54eca11a318f3160943d20c.bmp.html My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
shornw Posted November 9, 2011 Posted November 9, 2011 (edited) I think I understand what you want. If I'm right, there are a couple of things to consider. 1. If you aren't concerned with users decompiling your script you could use InputBox() to input a password and compare it with a password stored in your script before launching the installer (not secure) 2. You could write a password into an encrypted file and use your script to compare it before launching the installer. (better than previous option) If you are asking for an AutoIT script to query your domain SAM, then I'm pretty sure it can't be done. Better people than me will be able to confirm this. #cs****************************************************************** Example ** Username and password will be stored in the compiled .exe but can ** be extracted if the .exe is decompiled ** Despite the credentials I have used below, this method is NOT ** case sensitive ** ********************************************************************* #ce $c = 1 Do $un = InputBox("UserName", "Enter your UserName", "", "*", 150, 80) If @error = 1 Then Exit $pw = InputBox("Password", "Enter your password", "", "*", 150, 80) If @error = 1 Then Exit If $pw = "MyP4ssw0rd" And $un = "MyName" Then MsgBox(0, "File", "Put your installer in this line") ; eg Run("Filepath\file.exe") Exit Else $er = MsgBox(5, "Error - Attempt "& $c, "Incorrect credentials entered, click 'Retry' to try again or cancel to exit") If $er = 2 Then Exit $c = $c + 1 ContinueLoop EndIf Until $c = 4 Edited November 9, 2011 by shornw [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]
sleepydvdr Posted November 9, 2011 Posted November 9, 2011 Another way you could approach it: DriveMapAdd("B:", "\\sharecomputer\share", 0, "username", "password") RunWait("B:\executable_to_run.exe") ; You could use silent switches to install without user interaction DriveMapDel("B:") caramen 1 #include <ByteMe.au3>
caramen Posted November 10, 2011 Author Posted November 10, 2011 Another way you could approach it: DriveMapAdd("B:", "sharecomputershare", 0, "username", "password") RunWait("B:executable_to_run.exe") ; You could use silent switches to install without user interaction DriveMapDel("B:") this is just the imba way i was looking for, fine i like this solution Thx i will work on this and give feed back here and probably i will give my script in open source to share it, if i got a good one. Ty My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
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