Jump to content

run REG command line in autoit


shay
 Share

Recommended Posts

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

Link to comment
Share on other sites

Have you looked at RegWrite in the help file.


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

Link to comment
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

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...