VI - ShGetFolder security and Windows API functions

Hello

Let me explain what I'm doing.

In order to ensure a program and ensure that it can be installed only on a single computer; I read the MAC address of the PC, manipulate the MAC address to produce an activation code.  The user give me their address MAC and I give them the activation code for them to enter.

The question is where to store the activation code.  I use LV 8.0 and Vista, but the software could be deployed to computers using XP or 2000.  Previously, I had decided to use the Windows registry to store the activation code.  However, I have since discovered that when I write in the registry under Vista the entry is not found.  I can be read ok but can't find it.  Where is it in Vista?  A search in the registry will not locate.  I find in XP ok.

I need a reliable place to put the activation code once users have entered.  I've seen suggestions of using the Windows API function ShGetKnownFolderPath (Vista) and ShGetFolder (XP, it works for the year 2000?).  These features would allow me to do what?

How can I use the fnctions of Windows APIs such as ShGetFolder?  I have no idea.

Help, please.

Thank you.

Continuation of the last post...

HKEY_CURRENT_USER will probably work for you. It's a little difficult but when different Vista users use the application.

Be careful with Mike's suggestion. By default, it is not possible to write to the Program Files folder (even once, unless you run the application as administrator or you grant full access to the folder/file to the user or the group "Authenticated users").

The application data folder may also be a good place to store. To get the path, you must use the Windows API to return the path of the folder. Implementation of the present can be found on the LAVA (post #7).

Hope this helps,

Daniel

Tags: NI Software

Similar Questions

Maybe you are looking for