Sign in to follow this  
Followers 0
shay

run REG command line in autoit

7 posts in this topic

HI

i try to use this command line in AutoIt as part of larger script'

Actual command under DOS
REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce /v EWF /t REG_SZ /d "d:\test.exe"

Autoit unable to preform this command because of the " at the end

RunWait(@COMSPEC & " /c REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce /v EWF /t REG_SZ /d "d:\test.exe")

how can i execute this command under Autoit?


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites



Have you looked at RegWrite in the help file.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

thanks!

i use REGWRITE and looks like it do the job.!

RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce", "ewf", "REG_SZ", "d:\test.exe")

:)


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites

RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce", "EWF", "REG_SZ", '"d:\test.exe"')

Share this post


Link to post
Share on other sites

RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce", "EWF", "REG_SZ", '"d:\test.exe"')

May i know how to insert registry string if we are "Restricted user" i get error" Error Creating Value", Error writng to the registry.

Help

Share this post


Link to post
Share on other sites

Do a forum search on +regwrite +runas


[size="1"][font="Arial"].[u].[/u][/font][/size]

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