| View previous topic :: View next topic |
| Author |
Message |
wolive
Joined: 20 Jul 2004 Posts: 21 Location: South Africa
|
Posted: Sun Aug 15, 2004 5:38 pm Post subject: Importing reg files |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Aug 15, 2004 7:06 pm Post subject: |
|
|
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 |
|
 |
wolive
Joined: 20 Jul 2004 Posts: 21 Location: South Africa
|
Posted: Mon Aug 16, 2004 2:21 pm Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Aug 16, 2004 3:55 pm Post subject: |
|
|
| 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 |
|
 |
|