Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello, I need to add a key to win registry so that I can retrieve the installed program path.

 

1 - How do I add a key with the programs path?

2 - When will I add it anyway? During the programs instalation? How?

3 - And how do I read the registration key that includes the path?

 

This is my first attempt to use the win registry, I total new to this...

 

Tks for any possible help.

  • 2 weeks later...
  • *Gurus*
Posted

You can create, modify and delete registry keys and values using the [msdn]Microsoft.Win32.Registry[/msdn] class.

 

The path to your application is retrieved as follows:

 

Dim applicationPath As String = System.Reflection.Assembly.GetExecutingAssembly().Location

 

Most programs add keys and values to the registry when they are installed, and also when they are run for the first time. It is up to you to decide which keys and values are persisted and when.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...