While developing the MSI setup for my C# winforms application in Visual
Studio .NET 2003 I experimented with the Serial Number and it now contains a
bogus value on my test machine.

This bogus serial number is faithfully being maintained on this test
machine.

How can I change or delete the serial number associated with this
application on this machine?

Is it as simple as am Orca tweak of the .msi file?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

RE: Reset Serial Number by v-felwa

v-felwa
Sun Apr 25 22:35:59 CDT 2004

Hi Thom,

Thanks for posting.

To remove the serial number, we can uninstall the product. Apart from that,
I don't think we have any good way to change it using Windows Installer
APIs and it is not recommended to do so.

If you insist on changing it, you can try modifying the registry directly.
After the installation, the product ID, user name, company name will be
stored in Windows Installer's registry:

For per-machine installation, the information will be under the following
key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserD
ata\S-1-5-18\Products\<hash>\InstallProperties

For per-user installation:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserD
ata\<user's SID>\Products\<hash>\InstallProperties

Note that modifying the registry directly is not documented or supported.
You may use the approach at your own risk.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Re: Reset Serial Number by Thom

Thom
Mon Apr 26 10:56:49 CDT 2004

Felix:

Thank you for the (as usual) very helpful information.

Under the heading of "but the light is so much better over here" ...

The information is not being maintained across an uninstall as I originally
thought. The uninstall deletes the Registry key and validation is again
permitted.

What was happening was that I had a %%%%%% field and the test key I was
using was not passing the validation test. This gave the appearance of
retaining the key when in fact it was simply caused by my selection of
arbitrary serial numbers.

Is there an easy way to determine the "<hash>"?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

"Felix Wang" <v-felwa@online.microsoft.com> wrote in message
news:Ibcdi%23zKEHA.2396@cpmsftngxa10.phx.gbl...
> Hi Thom,
>
> Thanks for posting.
>
> To remove the serial number, we can uninstall the product. Apart from
that,
> I don't think we have any good way to change it using Windows Installer
> APIs and it is not recommended to do so.
>
> If you insist on changing it, you can try modifying the registry directly.
> After the installation, the product ID, user name, company name will be
> stored in Windows Installer's registry:
>
> For per-machine installation, the information will be under the following
> key:
>
>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserD
> ata\S-1-5-18\Products\<hash>\InstallProperties
>
> For per-user installation:
>
>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserD
> ata\<user's SID>\Products\<hash>\InstallProperties
>
> Note that modifying the registry directly is not documented or supported.
> You may use the approach at your own risk.
>
> Regards,
>
> Felix Wang
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Re: Reset Serial Number by v-felwa

v-felwa
Mon Apr 26 20:40:55 CDT 2004

Hi Thom,

As I mentioned in another post under the "csharp" newsgroup, you may have
some misunderstanding here. Please refer to the following link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxgrfserialnumbertemplateproperty.asp?frame=true

"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."


Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Re: Reset Serial Number by Thom

Thom
Mon Apr 26 22:07:12 CDT 2004

Felix:

Yes I attempted to tell you exactly that in my last response. It is
operating correctly for me and I understand it.

Do you know of an easy way to get the value for the <hash>?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

"Felix Wang" <v-felwa@online.microsoft.com> wrote in message
news:ugo82i$KEHA.2360@cpmsftngxa10.phx.gbl...
> Hi Thom,
>
> As I mentioned in another post under the "csharp" newsgroup, you may have
> some misunderstanding here. Please refer to the following link:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
> ml/vxgrfserialnumbertemplateproperty.asp?frame=true
>
> "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."
>
>
> Regards,
>
> Felix Wang
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Re: Reset Serial Number by v-felwa

v-felwa
Tue Apr 27 01:30:42 CDT 2004

Hi Thom,

I am sorry that the information regarding the hash value is undocumented. I
can only say it is derived from the Product Code of the MSI here.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Re: Reset Serial Number by Thom

Thom
Tue Apr 27 01:58:40 CDT 2004

Felix:

Thank you for verifying that I wasn't overlooking something obvious.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

"Felix Wang" <v-felwa@online.microsoft.com> wrote in message
news:oEddsECLEHA.2192@cpmsftngxa10.phx.gbl...
> Hi Thom,
>
> I am sorry that the information regarding the hash value is undocumented.
I
> can only say it is derived from the Product Code of the MSI here.
>
> Regards,
>
> Felix Wang
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Re: Reset Serial Number by v-felwa

v-felwa
Tue Apr 27 03:21:07 CDT 2004

Hi Thom,

Please feel free to post here if you have any further concerns.

Have a nice day.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.