running *.reg-file silently

  • Thread starter Thread starter DraguVaso
  • Start date Start date
D

DraguVaso

Hi,

Does anybody knows how to run a *.reg-file silently on a computer? I need
this to do automatic updates of my application without user-interaction.

So I don't want the user to be asked a confirmation before writing
everything to the registry, and I don't want a succes-or-error-message at
the end.

Any help would be really appreciated!

Thanks a lot in advance,

Pieter
 
DraguVaso said:
Does anybody knows how to run a *.reg-file silently on a computer? I need
this to do automatic updates of my application without user-interaction.

So I don't want the user to be asked a confirmation before writing
everything to the registry, and I don't want a succes-or-error-message at
the end.

Any help would be really appreciated!

Hi DraguVaso,

"regedit /S yourRegFile.reg" inserts the reg-file in "silent"-mode.

Dim p As Process = New Process
Dim ps As ProcessStartInfo = New ProcessStartInfo
ps.FileName = "regedit"
ps.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = ps
p.Start()

Cheers

Arne Janning
 
I don't know... but if you have the possibility to do the reg modifications
in the VB code, you can do it from there.

/Lars
 
Hi Pieter,

Because I thought that you told once in what kind of company you are working
for i was thinking that you did wanted to help OHM with its GetRichQuick
class.

Just kidding, I do not know it, however I think that when it was my problem,
I would look how I could proces the .reg file using a VB program.

Cor
 
Hehe,
You mean the
clsGetPieterRich.PickOneCentFromEveryClientTransaction-function? :-)
 
Does anybody knows how to run a *.reg-file silently on a computer? I need
this to do automatic updates of my application without user-interaction.

General Syntax:

Import (merge) a .REG file:

REGEDIT.EXE [ /L:system ¦ /R:user ] [ /S ] importfile.REG

Export to a (.REG) file:

REGEDIT.EXE [ /L:system ¦ /R:user ] /E exportfile
"registry_key"

Parameters:

importfile.REG .REG file to be imported (or "merged")
exportfile File name the information should be written to
"registry_key" Registry key to be exported
e.g. "HKEY_CLASSES\ROOT\*\shell"
/S Silent, i.e. hide confirmation box when
importing files
/E Export registry file
/L:system Specify the location of the system.dat to use
/R:user Specify the location of the user.dat to use
/C Compress [filename] (Windows 98 only)


So something like REGEDIT /S <importfile.reg> should do the trick.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top