MarcWWS Posted March 27, 2015 Share 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 Link to comment Share on other sites More sharing options...
water Posted March 27, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
MarcWWS Posted March 27, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
MarcWWS Posted March 27, 2015 Author Share Posted March 27, 2015 Any help ? Link to comment Share on other sites More sharing options...
water Posted March 27, 2015 Share Posted March 27, 2015 Is "WD Drive Unlock.exe" located on o: as well? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
MarcWWS Posted March 27, 2015 Author Share 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") Link to comment Share on other sites More sharing options...
water Posted March 27, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
MarcWWS Posted March 30, 2015 Author Share 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.. Link to comment Share on other sites More sharing options...
MarcWWS Posted March 30, 2015 Author Share 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 ? Link to comment Share on other sites More sharing options...
MarcWWS Posted March 30, 2015 Author Share Posted March 30, 2015 No1 got an idea for this "easy" script ? Link to comment Share on other sites More sharing options...
jguinch Posted March 30, 2015 Share 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 Link to comment Share on other sites More sharing options...
MarcWWS Posted March 30, 2015 Author Share 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) Link to comment Share on other sites More sharing options...
jguinch Posted March 30, 2015 Share 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 Link to comment Share on other sites More sharing options...
MarcWWS Posted March 31, 2015 Author Share 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 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