install .reg file when db starts

  • Thread starter Thread starter DHill009
  • Start date Start date
D

DHill009

i have a database running on 2007 runtime.

when the database starts i need it to install a .reg file. this re-writes a
reg key.

also if poss i want to suppress the confirmation boxes.

the .reg file to install is:

c:\Titan\Rereg.reg

any help would be great ;-)
 
Use Shell to run regedit.exe

Untested, but:

Dim strCmd As String

strCmd = "regedit.exe c:\Titan\Rereg.reg"
Shell strCmd
 
i didnt work....

i get vb error:

runtime error '5'
invalid procedure call or argument.

when i click debug it highlights shell strcmd as a problem

any other idea's....im not very good with vb
 
I just tested, and it works fine for me.

What exactly did you do with the code I suggested?
 
Use Shell to run regedit.exe

Untested, but:

Dim strCmd As String

strCmd = "regedit.exe c:\Titan\Rereg.reg"
Shell strCmd

Why not just use ShellExecute?
 
Back
Top