MarcWWS Posted March 27, 2015 Posted March 27, 2015 (edited) Hello, i've just downloaded AutoIT because i have to handle a problem. I got a user in my domain who has to start a unlocker for the WD My Passport (encrypted external HDD). The Unlocker path is "O:WD Drive Unlock.exe", this one needs admin rights. Edit: The Drive "O" is an simulated CD-Drive but i think it doesnt botther. I've just wrote this code but doesnt work for me : RunAs ("install",@ComputerName,"installPassword",1, "WD Drive Unlock.exe","O:\") Edited March 27, 2015 by MarcWWS
water Posted March 27, 2015 Posted March 27, 2015 Welcome to AutoIt and the forum! "install" is a local or a domain user? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
MarcWWS Posted March 27, 2015 Author Posted March 27, 2015 (edited) "install" is a local and a domain user. but when i execute the .exe i says domain authentification RunAs ("install","wiwe.local","installPassword",1, "WD Drive Unlock.exe","O:\") doesnt work,too. RunAs ("install","wiwe.local","installPassword",1, "notepad.exe","") This with the notepad work, did it just to test it. Edited March 27, 2015 by MarcWWS
water Posted March 27, 2015 Posted March 27, 2015 Is "WD Drive Unlock.exe" located on o: as well? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
MarcWWS Posted March 27, 2015 Author Posted March 27, 2015 Yes, the .exe is directly under o: . I've also tested it now with a other Programm(code below) which is on my HDD, doesnt work as well too. RunAs ("install",@ComputerName,"installPassword",1, "ACMPConsole.exe","C:\Program Files (x86)\Aagon\ACMP Console\Bin")
water Posted March 27, 2015 Posted March 27, 2015 You have to specify the full path: RunAs ("install","wiwe.local","installPassword",1, "O:\WD Drive Unlock.exe","O:\") My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
MarcWWS Posted March 30, 2015 Author Posted March 30, 2015 You have to specify the full path: RunAs ("install","wiwe.local","installPassword",1, "O:\WD Drive Unlock.exe","O:\") for some reason it wont work..
MarcWWS Posted March 30, 2015 Author Posted March 30, 2015 Should it work at all , because the HDD pretends to be a CD drive? And with the domain Login there should be no problem, too ?
jguinch Posted March 30, 2015 Posted March 30, 2015 When you run O:WD Drive Unlock.exe manually, are you prompted for an elevation of privileges ? Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
MarcWWS Posted March 30, 2015 Author Posted March 30, 2015 The Pop-up ask me if im sure that the programm can make changes and need Administration privilleges of the domain. (tested with an normal user)
jguinch Posted March 30, 2015 Posted March 30, 2015 OK, the UAC is enabled : RunAs will execute the program with admin rights (if "install" is an admin account) but won't elevate the privileges. So you can't skip the UAC prompt easily. You have to use #RequireAdmin at the top of you code. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
MarcWWS Posted March 31, 2015 Author Posted March 31, 2015 (edited) Now it executes the programm. But i thaught i can write this that a normal user without admin can execute the Programm. In my company not every one got admin rights. So i thaught i can write this programm that every customer (without admin rights) can use the external HDD. Atm i got this : #RequireAdmin RunAs ("install","wiwe","installPassword",2,"O:\WD Drive Unlock.exe","O:\") When i run this with the normal user it ask me to enter Admin user but after entering it the Unlock.exe starts. What i need is that i dont need to enter admin. Edit: I wrote a 2nd script now that executes this script and this works i dont know why and if this is the right way but till it works its fine.. Edited March 31, 2015 by MarcWWS
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