Fog Creek Software
g
Discussion Board




Serial Numbers with Installshield 6.2

I am using Installshield 6.2 for packaging my application. Its got a call to the SdRegisterUserEx function in order to display the user information (User Name, Company Name and Serial Number) dialog box.

I want to know how is it that I code a serial number into the script. I tried hardcoding a serial number into the script myself from inside the OnFirstUIBefore() as follows:

Dlg_SdRegisterUserEx:
    szMsg  = "";
    szTitle = "";    
    nResult = SdRegisterUserEx( szTitle, szMsg, svName, svCompany, svSerial ); 
    if (svSerial != "1G9kL2-3095FF0-35933") then
        return -1;
    else
        if (nResult = BACK) goto Dlg_SdShowInfoList;
    endif;

but doing so branches to the next event OnMove(). I want the application to exit if the serial number is incorrect. What's the code for exiting the setup wizard?

Better still, I'd like to know all about this serial number stuff. How do I validate a serial number even if I do not have to hard code it. Hard coding the serial number would mean a common serial number for all users. I do not want a common serial number for all users. I want the users to have different serial numbers each. How do I proceed?

Sathyaish Chakravarthy
Monday, October 6, 2003

The simple answer is the Abort() command will stop the install and back out all InstallShield changes to the registry.  Here is a InstallShield help site ( Not InstallSheild sponcered) http://www.installsite.org/  InstallShield is not a popular tool with this group.

A Software Build Guy
Monday, October 6, 2003

Thanks for the help. Rummaging through the help files, the forums on the Net and Google search pages tell me that I need an extention DLL written in C++ for validating the serial number.

I am going to try Aborting with the hardcoded serial number for all users until I can adapt to the DLL thing.

Thanks very much for the help.

Sathyaish Chakravarthy
Tuesday, October 7, 2003

The reason why you should have your checking in a seperate dll is that InstallShield really creates scripts - which can easily be decompiled. There's already a bunch of tools out there which allow this, thus making your validation useless. Cracking your validation when the code resides in an binary executable, probably obfuscated and de-Softiced, makes it much more difficult for the cracker.

Johnny Bravo
Tuesday, October 7, 2003

Hmm! I dig that. Thanks!

Sathyaish Chakravarthy
Wednesday, October 8, 2003

*  Recent Topics

*  Fog Creek Home