AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Importing reg files

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
wolive



Joined: 20 Jul 2004
Posts: 21
Location: South Africa

PostPosted: Sun Aug 15, 2004 5:38 pm    Post subject: Importing reg files Reply with quote

I am currently using the following routine in a batch file to import numerous registry files.

for %%i in ("*.reg") do (
Reg Import "%%i"
)

Is there an equivalent routine that can be used to do the same in AHK.

Thanks
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Aug 15, 2004 7:06 pm    Post subject: Reply with quote

I think this would be equivalent:
Code:
SetWorkingDir, Whatever dir you want (if not already set to that dir)
Loop, *.reg
     run, reg import "%A_LoopFileFullPath%"

To additionally make it recurse into subfolders, use the following replacement line:
Loop, *.reg, , 1

More details are at http://www.autohotkey.com/docs/commands/LoopFile.htm
Back to top
View user's profile Send private message Send e-mail
wolive



Joined: 20 Jul 2004
Posts: 21
Location: South Africa

PostPosted: Mon Aug 16, 2004 2:21 pm    Post subject: Reply with quote

Thanks for the reply. Your script works like a charm. I have two other Q's.
1. Are there any shorthand alternatives for the registry root keys, like HK_LM for HKEY_LOCAL_MACHINE. I know you can create work around's for this but it would nice if it were natively available.
2. Is it possible to create a message window without any buttons, and then have it close after the script is executed. I'd like to use this to display information during unattended installations.

Thanks in advance.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Aug 16, 2004 3:55 pm    Post subject: Reply with quote

Quote:
shorthand alternatives for the registry root keys

Yes, in v1.0.07+, you can use the abbreviations for each root key, such as HKLM.

Quote:
Is it possible to create a message window without any buttons, and then have it close after the script is executed. I'd like to use this to display information during unattended installations.

To do a simple always-on-top window, use SplashTextOn and SplashTextOff. To do something more elaborate, you could use Progress or SplashImage to have full control over font size, color, etc.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group