Re: How to detect multiple instances of my app?



Haven't we established that writing to HKLM under Vista is unreliable unless
one has elevated privlidges? Better to use HKCU.


"expvb" <nobody@xxxxxxx> wrote in message
news:eUntoD1RJHA.4764@xxxxxxxxxxxxxxxxxxxxxxx
| "expvb" <nobody@xxxxxxx> wrote in message
| news:%23%23Ig$g0RJHA.4680@xxxxxxxxxxxxxxxxxxxxxxx
| > "Jack" <replyto@it> wrote in message
| > news:%23u2VMmzRJHA.1144@xxxxxxxxxxxxxxxxxxxxxxx
| >> Thanks, that is what I thought.
| >> I have to keep the track of each installation and store the required
data
| >> in some key in the registry.
| >
| > Check this post to see if it's helpful:
| >
| > How to Get the Old AppId example:
| > http://news.jrsoftware.org/news/innosetup/msg57379.html
|
| Scratch that. You can use HKLM during install time to store the path in
| values like path1, path2, etc. Use RegEnumValue() to read the list of
| values. This can be done using Inno with some [Code], or by using your own
| EXE to do it. Inno has RegGetValueNames() to do this, and in the help
there
| is a sample that loops through values.
|
| If you want to do it in VB, download the following source code library:
|
| http://sourceforge.net/projects/codebox/
|
| In "src" folder, add CRegistry.cls file to your project to have easy to
use
| registry functions. See SaveString() and EnumSubKeyValues() in particular.
| There is another file called CRegKey.cls, but it's a trimmed down version
| that doesn't enumerate values in a particular key.
|
| The library is a collection of classes that replicate the Common Controls
| functionality using the API, plus many other useful classes, such
| manipulating files and the registry.
|
|


.



Relevant Pages

  • Re: Determine Available Browsers
    ... I want to be able to allow a user to select one of the browsers ... Finally, to access the registry easily from VB6, download the following ... registry functions. ... functionality using the API, plus many other useful classes, such ...
    (microsoft.public.vb.general.discussion)
  • Re: Determine Available Browsers
    ... I want to be able to allow a user to select one of the browsers ... Finally, to access the registry easily from VB6, download the following ... registry functions. ... functionality using the API, plus many other useful classes, such ...
    (microsoft.public.vb.general.discussion)
  • Re: Windows Service - Event Log
    ... writing to the registry (HKLM). ... that I am too) are talking about creating an Event Log, ... Administrators group on the local machine, or the local System account. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Com Add-in Question?
    ... I have set up all the relevant HKLM ... When I install it and I look at the Registry HKEY_Users has nothing, ... HKLM is as expected but HKCU still appears. ... > Is the addin registered in HKEY_USERS? ...
    (microsoft.public.outlook.program_addins)
  • Re: Using Visual Studio Installer, create an Outlook COM component that can only be installed by an
    ... I can provide you with a REG file that "extends" the VB6 Add-In Designer so ... it allows options for registering your add-in under HKLM. ... Outlook ] ... > necessary registry entries in HKLM in your installer. ...
    (microsoft.public.vb.com)