Activity Stream
48,167 MEMBERS
6803 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    The Wise One
    Website's:
    twilight.ws ddlrank.com

    Default [C#] Need help adding registry entries during setup

    Hey all,

    I'm working on a C# application for image uploading, everything is going great but the only thing that I can't really figure out is how to add registry entries.

    I need to add an extra item to the windows context menu during the setup/initial run of the application (preferably during setup).

    I need to add several keys for certain file-extensions under the HKEY_CLASSES_ROOT.

    I could do this every time the application is ran, but that would not be performant. It would also require the application to be ran as an administrator. The setup of an application always requires administrator privileges so it would be cool if I could add some sort of class to run during installation.

    I have already looked into an installer class and all but Im really newb in making setup/deployment project so if any of you could guide me in the right direction.

    Basicly what I need is:
    -During setup registry entries must be made (And I also need the location of where the application is installed so a .reg file is a no-go unless I can pass arguments to it).

    Thanks for the future help :-)
    Whoo
    Whoo Reviewed by Whoo on . [C#] Need help adding registry entries during setup Hey all, I'm working on a C# application for image uploading, everything is going great but the only thing that I can't really figure out is how to add registry entries. I need to add an extra item to the windows context menu during the setup/initial run of the application (preferably during setup). I need to add several keys for certain file-extensions under the HKEY_CLASSES_ROOT. I could do this every time the application is ran, but that would not be performant. It would also Rating: 5
    I can always be contacted by sending a tweet @twilightws

  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    If you create a Deployment Project in Visual Studio you have an editor to manage file types and other registry stuff. Have a look at that, it's fairly easy.


  4.     
    #3
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Thanks for the reply Hyperz although I have looked several times at the registry view when creating such a project I need to store the location of the application (after it has been installed) as a value of a key that is going to be made.

    Any way to get that value?

    Btw an example is HKEY_CLASSES_ROOT/pngfile/shell/MyAppNameHere/command
    The default value for command will contain the location of my application
    I can always be contacted by sending a tweet @twilightws

  5.     
    #4
    Respected Developer
    Why do you need to store the location of your program in the registry?

  6.     
    #5
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Because when right clicking on certain files with a certain extension the name of my application must appear in the windows context menu. In order to launch an application when clicking it then the location of the application must be stored in the registry else windows doesn't know what to do when my application is clicked in the context menu.

    Thanks
    I can always be contacted by sending a tweet @twilightws

  7.     
    #6
    Respected Developer
    You can let the installer run commands after installation. You can find documentation about that on msdn.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create calendar entries in Horde
    By Areon in forum Server Management
    Replies: 0
    Last Post: 26th Feb 2014, 12:09 PM
  2. What are the top three entries of your browser history list?
    By sniffdog in forum General Discussion
    Replies: 17
    Last Post: 15th Oct 2012, 05:04 PM
  3. Compare 2 lists to find unique entries
    By maloxi in forum Webmaster Resources
    Replies: 5
    Last Post: 21st Oct 2011, 11:33 AM
  4. [Help] registry problem
    By freecbc3 in forum Technical Help Desk Support
    Replies: 2
    Last Post: 10th Oct 2010, 04:44 PM
  5. what entries i should do? Please take a look.
    By arunkumar2006 in forum Technical Help Desk Support
    Replies: 1
    Last Post: 11th Apr 2008, 06:38 AM

Tags for this Thread

BE SOCIAL