Sign in to follow this  
Followers 0
Krazyk

RegEdit Script Error

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 ! Posted Image

Try another way

RunWait ( "regedit.exe /s Enable1.reg", @ScriptDir )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Would it look like this then?

Run("test.exe", /s)

WinWait ("Select Setup Language")

WinWaitActive("Select Setup Language")

Send ("{ENTER}")

Share this post


Link to post
Share on other sites

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.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Krazyk

Share this post


Link to post
Share on other sites

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

Use #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.

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