Results 1 to 7 of 7

Thread: Using a .Reg File

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    I opened RegEdit, and well I Exported the
    directory I wanted into a .reg file and well
    I wanted to execute on first run of the program
    to configure it.
    I ran the program with the commandline arguement
    of the .reg files full path and it asked me if
    I wanted to add it .. so I said yes.
    I want it to add it without me saying yes.
    How do I do that?

    Thanks!

  2. #2
    Guest
    Code:
    SendKeys "{ENTER}"

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Location
    Rockford, IL
    Posts
    21

    Try API

    Did you try looking at API code to write the registry?

    Creating a .Reg file is okay I did when I didn't know how.

    I'm not even sure if Sendkeys will work...if it doesn't let me know I have the source code for this at work.

    -Ober


  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    Actually,

    I needed to configure the
    program at first run( I have
    like 23 keys and some folders)

    So I exported it ... thinking
    it would be easier..

    Sendkeys didnt work so I made
    a program to actually read
    the .reg file and do what it
    wants.. if anyone wants it..

    They can have it.

  5. #5
    Member
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    42

    You can use /s

    Hi,

    If you want to import a .reg file without having to answer a question, you can use a command line parameter "/s" which stands for "silent".

    Use shell to execute the following:

    Regedit.exe /s RegFileNameAndPath

    Where RegFileNameAndPath represents the location and name of your .reg file. This is a simple and easy way to get the job done.

    Greetings,
    Greetings,

    Hajo Dijkstra


  6. #6
    Junior Member
    Join Date
    Aug 2000
    Location
    Rockford, IL
    Posts
    21

    Thats rightt!!

    Thats how I did it.

    I knew Sendkeys didn't work...
    Man bring back some old memories with that old code.

    Thats the same as a Batchfile.
    At the time I didn't know how to write Shell commands to good in VB so I just shelled a Bat file that ran my .Reg


  7. #7
    Guest

    Other way to do that

    You could also include registry adding into a installation program. Inno Setup makes quite a good setups from a script and it is free.

    It can also be set to make the icons, install system files to correct places etc. It is easy to use after you learn the script (there's help of course). Then you don't have to use .reg files.

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