-
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!
-
-
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
-
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.
-
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,
-
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
-
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.