Friday, 30 November 2007

License Management for StockTake Scanners

The license is based on a hash code generated from the StockTake scanners hardware. A license file must be created using the licensing application which is located in s:\internal\stocktakeLicensing called ManageLicense.exe. This generates a license file called stocktake.lic which needs copying onto the Pocket PC devices ‘My Documents’ folder. A license lasts until the end of the current year, at which point a new license must be generated. I’ve put together a ‘step by step’ guide below.

Step 1 - Get the Devices Hardware Hash

When the application first runs it will look for a file called stocktake.lic in the ‘My Documents’ folder on the handheld device. The first time the application runs this file will not exist. The device will display its ‘device code’ on the screen.






Figure 1 - Displaying the device hash










TIP:: The system also writes out the device hash into a file called ‘stockhash.txt’ onto the ‘My Documents’ area of the Pocket PC whenever a license is detected as invalid. This is required for generating replacement licenses and its much simpler than rekeying the value on the screen.

Step 2 – Generate the License File

Run the ManageLicense.exe program. You want to enter the device hash into the top text box. You need to click the ‘Generate License’ button. Finally the resulting license needs saving. Click ‘Save License File’, the resulting stocktake.lic file will be dropped into your current directory.
You can now copy this into the ‘My Documents’ folder on the PocketPC device. The software will now run.



Figure 2 - The license generator

No comments: