Results 1 to 2 of 2

Thread: Run .reg file when app starts

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    NSW,Australia
    Posts
    34
    When my VB App starts, I need to check if there are registry keys setup for it. If there are not any found, is there a way to run a .reg file that will be stored in a directory on my harddrive to install all the necesary regestry keys? I have exported the keys that I need to be installed and strored them in a file called MyApp_HKEY_LOCAL_MACHINE.reg on the C:\ Drive.

    Thanks

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655

    Thumbs up

    Not difficult, use the following code:

    Code:
    Sub SetReg(RegFile as String)
      Shell "regedit " & RegFile
    End Sub
    The only problem I have with this code is that some computers will display a message box after running the reg file that says something like "the information was added to the registry" and it likes to hide behind your app.
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width