Sign in to follow this  
Followers 0
chiners_68

can you run a .REG file from an autoit script..?

12 posts in this topic

im sure you can but im having problems.. error : Unable to execute the external program.

The system cannot find the file specified

I currently have the line below to execute the reg file. If I paste the quoted line in my run box the reg file runs fine. what do i need to do to get this to work. once ive got it running I then need to put in the /s for a silent run of the reg file..

Run("\\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg")

Share this post


Link to post
Share on other sites



RunWait("regedit.exe /s \\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg")

That's all.

Share this post


Link to post
Share on other sites

Excerlent cheers.

Share this post


Link to post
Share on other sites

for some reason its falling over on the space in the folder PaintShop Pro

can I put in another set of quotes round the UNC path so it will work with spaces in the folder & file name..?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Run('"\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg')

I tend to use chr(34) for hard path quotes; just my preference. I find it easier to read.

Run("Regedit /s " & chr(34) & "\\server\it$\Software\Other\PaintShopPro\PaintShop Pro.reg" & chr(34))

; Note the space after the regedit /s.

Edited by Ravenlark

Ravenlark-----------------------------------------------------when you find yourself with the majority, its time to pause and reflect - Mark Twain

Share this post


Link to post
Share on other sites

I tend to use chr(34) for hard path quotes; just my preference. I find it easier to read.

Run("Regedit /s " & chr(34) & "\\server\it$\Software\Other\PaintShopPro\PaintShop Pro.reg" & chr(34))

; Note the space after the regedit /s.

LOL :D

I totally missed the regedit /s part out!

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg')

Share this post


Link to post
Share on other sites

LOL :D

I totally missed the regedit /s part out!

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg')

Is this right?

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg')

I think so it's right. ??

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg"')

Share this post


Link to post
Share on other sites

I think so it's right. ??

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg"')
That line is what I would use :D

Share this post


Link to post
Share on other sites

Is this right?

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg')

I think so it's right. ??

RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg"')

And yet again I was a tool, "must not reply when busy doing other things".. I'll go and repeat this line 1000 times now.

Sorry

You are right RunWait('Regedit /s "\\server\it$\Software\Other\PaintShop Pro\PaintShop Pro.reg"')

Share this post


Link to post
Share on other sites

*.reg files don't get executed, you either merge them into the registry using regedit as suggested above or open them for editing using notepad (or any other text editor). The RUN or RUNWAIT command can be used for both.

Share this post


Link to post
Share on other sites

this finally worked..

RunWait("regedit.exe /s ""\\server\it$\Software\Other\PaintShop Pro\PaintShopPro_mod.reg")

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