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

## Recommended Posts

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

That's all.

##### Share on other sites

Excerlent cheers.

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

Run('"\\server\it$\Software\Other\PaintShop" Pro\PaintShop Pro.reg') #### Share this post ##### Link to post ##### Share on other sites 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

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 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 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 #### 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 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 on other sites

this finally worked..

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

## Create an account

Register a new account