ripken204 Posted August 29, 2005 Posted August 29, 2005 i know how to add reg keys in auto it but what about a .reg file? i exported some things from the registry to a .reg file and it is way too much for me to put it into an autoit file, so i was wondering if there was some way that i could do like Run("reg.reg") but that deosnt work.
JohnS Posted September 1, 2005 Posted September 1, 2005 What if I want to run the .reg file from another path and want to use a directory macro.For exemple, I want to run reg.reg that is in the system drive, under \install.What do I put?Run("REGEDIT /S @homedrive & \install\Reg.reg") - this does not workCan someone help this Autoit newbie?Thanks.
ripken204 Posted September 2, 2005 Author Posted September 2, 2005 you could tryRun("REGEDIT /S @homedrive & '\install\Reg.reg'")
Nologic Posted September 2, 2005 Posted September 2, 2005 hmm close...more like:Run("REGEDIT /S " & @homedrive & "\install\Reg.reg")How ever may need 8.3 file names???Run("REGEDIT /S " & FileGetShortName ( @homedrive & "\install\Reg.reg" ))but thats just taking a guess.
blinkdt Posted November 13, 2005 Posted November 13, 2005 I second that! This one has bugged me for ages. Special thanks to Nologic for bringin' it home!
Nologic Posted November 14, 2005 Posted November 14, 2005 Your welcome.Question...was 8.3 file names needed? I never did find out.
blinkdt Posted November 14, 2005 Posted November 14, 2005 Nope, FileGetShortName was not needed. I'm converting many of my scripts based on your find and everything is running smoothly, like so:Run("REGEDIT /S " & @ScriptDir & "\prefs.reg")
MCT Posted November 14, 2005 Posted November 14, 2005 do u find any (if any) advantages on using autoit vs cmd ?
Nologic Posted November 14, 2005 Posted November 14, 2005 blinkdt -Thanks for the FYI MCT -Well you don't get that little flicker from the command window. Hehe one of the few times autoit makes installs just a little cleaner. Well really MHz added in some code to his CMENU context menu utility that will actually convert most reg files to pure autoit scripts...which then you could convert into exe's so that you have a tad more security hidding important info contained in your reg files.Really at this point in the game I see no real reason to use cmd files at all and soon there won't be any need for vbs ether.There is so much more to autoit than silly install scripts like I have displayed in the autoit thread.Any thing you can currently do in a cmd file you can do in autoit...and autoit is far more flexable.Go to AutoIts actual forum and see some of the samples they have to show...it'll blow your mind.
--=ddSHADOW=-- Posted November 16, 2005 Posted November 16, 2005 I just useExample importing file.reg#include <Process.au3>_RunDos("reg import file.reg")for removing the keys use the long way it works perfectExample removing autostart of MSNRegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "MsnMsgr")The 1. method for removing .reg contains:Windows Registry Editor Version 5.00;Disable MSN[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]"MsnMsgr"=-dosent work durring install of windows
m00nw0lf Posted May 5, 2011 Posted May 5, 2011 how would a folder with more then one reg file be applied useing autoit
radix Posted May 5, 2011 Posted May 5, 2011 how would a folder with more then one reg file be applied useing autoitCopy au3 file or compiled in the folder where reg files are located#Include <File.au3>#Include <Array.au3>$RegList = _FileListToArray(@ScriptDir, "*.reg", 1) If IsArray($RegList) Then For $i = 1 to $RegList[0] RunWait('regedit.exe' & ' /s' & ' "' & $RegList[$i] & '"') NextEndIf
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now