Results 1 to 4 of 4

Thread: .NET deployment serial number query

  1. #1

    Thread Starter
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    .NET deployment serial number query

    I have a question or two about the use of the serial number facility that can be used on the 'Customer Infofmation' dialog that can be used within an deployment project.

    From the MSDN:

    The SerialNumberTemplate property determines how the text boxes will appear in the dialog box and also whether the serial number is validated only for format, or validated according to a Windows Installer algorithm.

    For example, setting the SerialNumberTemplate property to "<### - %%%%>" creates two text boxes separated by a dash surrounded by spaces. Validation for the first box (###) simply verifies that the user has entered three digits. The second box (%%%%) is validated by an algorithm that adds the digits together and divides the sum by 7.If the remainder is 0, validation succeeds; otherwise, it fails.
    Is the algorithm always the same, ie total of '%' numbers, divided by 7?

    If you set the template to <%% - %% - %%> does the algorithm add each of the three groups together, or take each group as a separate case, and divide each of them by 7?

    Thanks for any help!
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: .NET deployment serial number query

    i would think it would do each one seperatly.. but to be honest a simple test would answer your question

  3. #3

    Thread Starter
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: .NET deployment serial number query

    a simple test would answer your question
    Good point, well made.


    It actually turns out that it is applied to all of the '%' as a whole, and not each group separately, up until another placeholder character is encountered like '#' or '^'. Any other charatcers are ignored and simply displayed.

    <%% - %% - %%> One group, summed and divided by 7.

    <%% - ## - %%> Two groups, each summed and divided by 7.
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: .NET deployment serial number query

    my guess is you would want to make it pretty sporatic which digits were % and which were # because that way it would make it much harder to crack than grouping them

    like

    <%#%# - %%#% - ###% - #%%#>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width