Krazyk Posted April 2, 2011 Share Posted April 2, 2011 Hi, I am a complete newb to AutoIT3 I have done some VB back in the day, and recently found this sweet program, and figured WHY NOT. Here is what I am doing. I constantly test things on my computer. Sometimes it cause my computer to be reformatted. I am trying to make an AU3 Script that will launch a series of .reg files. I am using the following code minus the : :Shellexecute ("Enable1.reg") :WINWAITACTIVE ( "Registry Editor") :Send ("!") :Send ("Y") :Send ("{ENTER}") :Exit When it runs, the Registry Editor window pops up saying : Adding information can unintentionally change or delete values etc.etc. Are you sure you want to continue? The send function does not seem to function, how do I fix this. What am I doing wrong. Thanks in Advance Krazyk - The MADD Doctor Link to comment Share on other sites More sharing options...
wakillon Posted April 2, 2011 Share Posted April 2, 2011 (edited) The send function does not seem to function, how do I fix this. What am I doing wrong. Thanks in Advance Krazyk - The MADD Doctor Welcolme to the forums ! Try another way RunWait ( "regedit.exe /s Enable1.reg", @ScriptDir ) Edited April 2, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Krazyk Posted April 2, 2011 Author Share Posted April 2, 2011 Good News is that the script runs, bad news is it doesnt apply the .reg file being called (from same location as script) to regedit.exe. In other words If I Try to disable my ipv6 by setting to 0, it leaves it at 1. Also, this may be related or not, but how do i send the enter key. Trying to do a command for Glary Utilities Silent Installer....Send Command doesnt seem to work. Send ("{ENTER}") <--Is that right? Link to comment Share on other sites More sharing options...
wakillon Posted April 2, 2011 Share Posted April 2, 2011 Good News is that the script runs, bad news is it doesnt apply the .reg file being called (from same location as script) to regedit.exe. In other words If I Try to disable my ipv6 by setting to 0, it leaves it at 1.Also, this may be related or not, but how do i send the enter key. Trying to do a command for Glary Utilities Silent Installer....Send Command doesnt seem to work. Send ("{ENTER}") <--Is that right?you must add winwait and winactivate before winwaitactive... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Krazyk Posted April 2, 2011 Author Share Posted April 2, 2011 Would it look like this then? Run("test.exe", /s) WinWait ("Select Setup Language") WinWaitActive("Select Setup Language") Send ("{ENTER}") Link to comment Share on other sites More sharing options...
wakillon Posted April 2, 2011 Share Posted April 2, 2011 Would it look like this then?Run("test.exe", /s)WinWait ("Select Setup Language")WinWaitActive("Select Setup Language")Send ("{ENTER}")you forget winactivate ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Krazyk Posted April 2, 2011 Author Share Posted April 2, 2011 (edited) I Figured it out, I For some unseen reason must run every script as Administrator (Currently Running Windows 7 64Bit) Is their a Script out there for auto Elevating programs or scripts? Never Mind, If I Compile the Script, and change the properties on it to run as admin. it launches right away. Not sure what i was thinking or doing... Thanks for the fast replys Wakillon Edited April 2, 2011 by Krazyk Link to comment Share on other sites More sharing options...
bwochinski Posted April 2, 2011 Share Posted April 2, 2011 I Figured it out, I For some unseen reason must run every script as Administrator(Currently Running Windows 7 64Bit)Is their a Script out there for auto Elevating programs or scripts?Never Mind, If I Compile the Script, and change the properties on it to run as admin. it launches right away. Not sure what i was thinking or doing... Thanks for the fast replys WakillonUse #RequireAdmin on the first line to have a script (compiled or not) request admin rights when running. I just had to use this as well for something on Windows 7 due to Send() and ControlSend() not working without admin rights. 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