Licence Protector

Installation on a single PC

Hide Navigation Pane

Installation on a single PC

Previous topic Next topic  

Installation on a single PC

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

 

Installation Requirements

Until Vista, it was possible to copy the license file to the program directory. To ensure that a installation is working on all platforms including Vista / Windows 7 we recommend not using the program directory.

Necessary Rights

 

During Installation

Right to register a DLL

   

During Runtime of the Application

read and write permission to the license file
read and write permission to the registry (hkey_current_user)

 

If Licence Protector is used within a .NET server application, check if the .NET server user has the necessary rights.

Installation of the DLL

 

The folder ..\files for distribution contains all Licence Protector DLLs. There is an folder with a compressed version and uncompressed version. We recommend using the uncompressed version because it works with all compilers and operating systems.

 

There is an option to install the DLL without registering it. This allows to install without administration rights. See details - use DLL without registering.

 

The installation has to be done in administrator mode. A user with a standard account will automatically be prompted to provide administrator credentials. Make sure that you use the option in your installer: Require Administrator so that the installer compiles with a manifest file, which always requires the installation package to run as an administrator.

 

You should copy the licprotectorxy.dll to the \windows\system32 folder although it could also be installed in your program directory. As each DLL version of Licence Protector has an own ProgID, multiple different versions can be installed on the same machine.

 

If an installation tool like Wise or Install Shield is used, the registration of the DLL is done automatically by these tools. If you copy the DLL manually with your program, you have to register the DLL manually - use c:\windows\system32\regsvr32.exe ....\pathname\LicProtector300.dll.

 

 

If your installer has problems registering a DLL, add a shell execute command in the installer which invokes the regsvr32.exe like Execute "c:\windows\system32\regsvr32.exe"  " ....\pathname\Licprotector300.dll"

 

To register the DLL you need admin rights. If you would use regsvr32 in the DOS prompt or file explorer as a standard user, you get the error 0×80070005 meaning access “Access Denied. To manually register the DLL in Vista / Windows 7

 

right click on “Command Prompt” in Accessories and click “Run as Administrator
run “regsvr32 ....\pathname\LicProtector300.dll” in the command window

 

Vista / Windows 7 and MSI files
Some installers generate a message HRESULT -2147220472 or -2147023898. This is due to missing rights during installation. Use regsvr32.exe to register the DLL and not the installer built in dll register function.

 

 

Installation of the license file

Each user needs a read and write access to the license file. Because of new security restrictions on Windows Vista / Windows 7 you perhaps have to change an existing installation routine if you copy configuration files to c:\program files folder.

 

Windows Vista / Windows 7

Considerations

The installation has to be done in administrator mode. A user with a standard account will automatically be prompted to provide administrator credentials.

 

If User Account Control is enabled (default) the following installation scenario is NOT working.

 

install the licence file to C:\Program Files\YourApp\app.lic

 

If the standard user starts your application, Licence Protector will write back information in the licence file (depending on the features your are using). The file would be virtualized to the folder C:\Users\username\AppData\Local\VirtualStore\Program Files\YourApp\app.lic.

 

Although your application would open the licence file on C:\Program Files\YourApp\app.lic, the file would be opened in c:\Users\username\AppData\Local\VirtualStore\Program Files\YourApp\app.lic. The result would be that each user has a different licence file.

Recommendation

Although we found no recommended procedure from Microsoft how to share a file on one PC for all users, the following installation process will work.

 

Install the licence file to C:\ProgramData\yourcompany name\appname\app.lic

 

By default, standard users have only Read access and the folder is not visible. See below how to set write access to this folder.

Retrieve folder names

You can retrieve the folder name via the registry.

 

 

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Folders

Common AppData

C:\ProgramData\

Common Programs

C:\ProgramData\Microsoft\Windows\Start Menu\Programs

Common Documents

C:\Users\Public\Documents

Common Desktop

C:\Users\Public\Desktop

Common Start Menu

C:\ProgramData\Microsoft\Windows\Start Menu

CommonPictures

C:\Users\Public\Pictures

CommonMusic

C:\Users\Public\Music

CommonVideo

C:\Users\Public\Videos

Common Favorites

none

Common Startup

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Common Templates

C:\ProgramData\Microsoft\Windows\Templates

Common Administrative Tools

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools

Personal

none

 

Windows NT - XP

Considerations

The installation has to be done in administrator mode. A user with a standard account has to install with administrator credentials.

Recommendation

To use the same installation process for all operating systems you need a folder which allows to share a file on the PC for all users.

 

Install the license file to C:\Documents and Settings\All Users\Application Data\yourcompany name\appname\app.lic

 

By default, standard users have only Read access and the folder is not visible. See below how to set write access to this folder.

 

Retrieve folder names

You can retrieve the folder name via the registry.

 

 

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Folders

Common AppData

C:\Documents and Settings\All Users\Application Data

Common Programs

C:\Documents and Settings\All Users\Start Menu\Programs

Common Documents

C:\Documents and Settings\All Users\Documents

Common Desktop

C:\Documents and Settings\All Users\Desktop

Common Start Menu

C:\Documents and Settings\All Users\Start Menu

CommonPictures

C:\Documents and Settings\All Users\Documents\My Pictures

CommonMusic

C:\Documents and Settings\All Users\Documents\My Music

CommonVideo

C:\Documents and Settings\All Users\Documents\My Videos

Common Favorites

C:\Documents and Settings\All Users\Favorites

Common Startup

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

Common Templates

C:\Documents and Settings\All Users\Templates

Common Administrative Tools

C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools

Personal

C:\Documents and Settings\AN\My Documents

 

Setting Write Access to a folder during installation.

 

Some installers have built in options to change rights on folders. You cannot use the standard Windows tool cacls.exe or icacls (Vista) because you have to address the user / group name you want to change in the language of the operation system - e.g. 'users' or 'Benutzer'.

 

There is a tool SetAcl.exe which allows using SID to change the permission. The tool can be downloaded here: http://setacl.sourceforge.net/html/examples.html . Documentation for the SID can be found here (only German): http://www.grurili.de/index.html?/Grundlagen/WellKnown_SIDs.htm

 

Your installer could use the following sequence

 

Copy setacl.exe to the installation directory
Execute Setacl.exe e.g. "maindir\SetAcl.exe" -on "maindir" -ot file -actn ace -ace "n:S-1-5-32-545;p:full;s:y" - This will set full rights to the group users. The SID S-1-5-32-545 is used instead of the name users
 
(note: maindir is the folder name like c:\ProgramData\yourcompany name\appname)
Delete setacl.exe

 

 

 

To use the Licence Protector DLL on Windows 2000, you additionally have to install the GDI+ DLL, which is only part of the operating system in Windows XP and later.

Download DLL: http://www.microsoft.com/downloads/details.aspx?FamilyId=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en