Thanks so much, Charles--exactly what I need.   Next time I'll check MSDN as well as the help file.  
 
Thanks, Chris, for the TieRegistry suggestion--I may end up there yet.  I'm bringing all the perl I need along as part of the install kit, so I was trying to keep the footprint small and had left TieRegistry out so far.
 
Jim
 
 
----- Original Message -----
Sent: Tuesday, February 19, 2002 12:00 PM
Subject: Re: [Boston.pm] Win32 Registry import and processes

Regedit has a couple command line switches.  >From http://support.microsoft.com/default.aspx?scid=kb;EN-US;q82821

Syntax for REGEDIT.EXE

REGEDIT [/v|-v] [/s|-s] <FILENAME>

<FILENAME>

This is a .REG-formatted file, which can be produced with the Save Registration File command in the File menu of REGEDIT.EXE in advanced mode.

[/v|-v]

This switch opens REGEDIT.EXE in advanced mode, where the registration database is displayed in a tree structure (similar to the tree window in Windows 3.1 File Manager). Any part of the database can be edited.

[/s|-s]

When a filename is specified on the command line, this switch is used to suppress any informational dialog boxes that would normally be displayed. This is useful when the Setup program for an application wants to execute REGEDIT.EXE with a .REG file, but does not want the user to be confused by any dialog boxes that are displayed.



At 10:52 AM 2/19/2002 -0500, you wrote:
I'm writing a small install program for WinNT that imports a 'somestuff.reg' file into the registry via backticks:
 
# do some stuff
`regedit.exe somestuff.reg`;
# do cleanup tasks here
__END__
 
Regedit puts up a modal dialog box after the import --
 
"Somestuff.reg has been imported into the registry successfully."
                                     |OK|
 
 
that requires the user to hit return or click ok to continue. This modal box blocks all further execution until its needs are satisfied, whereas I want this script to run to completion unattended.  That's the problem I'm trying to solve. 
 
My attempts to feed it the 'CRLF' it requires, in various ways, have been unsuccessful thus far .
Regedit does not appear to have any command line switch to bypass the modal dialog box.
Regedt32 appears to import only binary, not text files, so would be a real pain to use in editing and import.
 
How can I force execution back to the perl process and kill the Regedit process after it blocks?
 
Thanks,
 
Jim
 
James Eshelman,
Principal,
Nova Software, Inc.
www.nova-sw.com

Reply via email to