By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,512 Members | 3,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,512 IT Pros & Developers. It's quick & easy.

Identification

P: n/a
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
- User Name specified during installation.
- Organization Name specified during installation.

What was the source of your information?

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

Nov 16 '05 #1
Share this Question
Share on Google+
22 Replies


P: n/a
Thom,

Unless the person compiling decides to place the information in the
assembly (through attributes, resources, or some other mechanism), that
information is not available.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Thom Little" <th**@tlanet.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
- User Name specified during installation.
- Organization Name specified during installation.

What was the source of your information?

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

Nov 16 '05 #2

P: n/a
Thank you for verifying that I was not overlooking something.

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

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OY*************@TK2MSFTNGP12.phx.gbl...
Thom,

Unless the person compiling decides to place the information in the
assembly (through attributes, resources, or some other mechanism), that
information is not available.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

Nov 16 '05 #3

P: n/a
Thom Little wrote:
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
If the assembly uses the default assembly-version-attribute, you can
calculate date/time from the last two entries in the version.

But the date/time of the file is in most cases also the compile/linkt time.
- User Name specified during installation. No.
- Organization Name specified during installation.

No.
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
Nov 16 '05 #4

P: n/a
Do you have a snippet that shows how the last two parameters in the default
version are manipulated to proved the date/time of compilation ?

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

"Jochen Kalmbach" <no********************@holzma.de> wrote in message
news:Xn*********************************@127.0.0.1 ...
Thom Little wrote:
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
If the assembly uses the default assembly-version-attribute, you can
calculate date/time from the last two entries in the version.

But the date/time of the file is in most cases also the compile/linkt

time.
- User Name specified during installation.

No.
- Organization Name specified during installation.

No.
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/

Nov 16 '05 #5

P: n/a
Thom Little wrote:
Do you have a snippet that shows how the last two parameters in the
default version are manipulated to proved the date/time of compilation


See: AssemblyVersionAttribute Constructor
http://msdn.microsoft.com/library/en-
us/cpref/html/frlrfsystemreflectionassemblyversionattributeclass ctortopic.a
sp

<msdn>
The format of the version string is: major. minor. build. revision.

When specifying a version, you have to at least specify major. If you
specify major and minor, you can specify an asterisk (*) for build. This
will cause build to be equal to the number of days since January 1, 2000
local time, and for revision to be equal to the number of seconds since
midnight local time, divided by 2.

If you specify major, minor, and build, you can specify an asterisk for
revision. This will cause revision to be equal to the number of seconds
since midnight local time, divided by 2.
</msdn>
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
Nov 16 '05 #6

P: n/a
As for the latter two, I think the installer can store this information in
the registry. The Visual Studio Deployment Project AFAIR even contains a
pre-designed screen for entering the user name and the organization name. I
am not sure it provides an underlying framework for storing the data entered
though, but one could easily overcome this by creating a couple of registry
entries in the Registry Editor (I mean one of the Deployment Project editors
here, not regedit.exe) and specifying their values to be taken from the
properties associated with the "Name" and "Organization" text boxes on the
"Registration Information" screen.

As for the first one, I believe this can be retrieved as the last
modification date for any other file at the very least?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Thom Little" <th**@tlanet.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
- User Name specified during installation.
- Organization Name specified during installation.

What was the source of your information?

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


Nov 16 '05 #7

P: n/a
Thank you for the lead ...

I'm trying to learn how this all fits together. Do you know of any snippet
that shows how to capture these values during the install and have them
reflected as values in the Registry?

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

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:eF**************@TK2MSFTNGP11.phx.gbl...
As for the latter two, I think the installer can store this information in
the registry. The Visual Studio Deployment Project AFAIR even contains a
pre-designed screen for entering the user name and the organization name. I am not sure it provides an underlying framework for storing the data entered though, but one could easily overcome this by creating a couple of registry entries in the Registry Editor (I mean one of the Deployment Project editors here, not regedit.exe) and specifying their values to be taken from the
properties associated with the "Name" and "Organization" text boxes on the
"Registration Information" screen.

As for the first one, I believe this can be retrieved as the last
modification date for any other file at the very least?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Thom Little" <th**@tlanet.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
- User Name specified during installation.
- Organization Name specified during installation.

What was the source of your information?

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

Nov 16 '05 #8

P: n/a
It cannot be a snippet, since, to the best of my knowledge, it is just a
matter of correct Deployment Project configuration which does not require
coding. I would however suggest you reposted this question to the
microsoft.public.dotnet.framework.setup newsgroup to talk to Deployment
Project experts.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Thom Little" <th**@tlanet.net> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Thank you for the lead ...

I'm trying to learn how this all fits together. Do you know of any snippet that shows how to capture these values during the install and have them
reflected as values in the Registry?

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

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:eF**************@TK2MSFTNGP11.phx.gbl...
As for the latter two, I think the installer can store this information in the registry. The Visual Studio Deployment Project AFAIR even contains a
pre-designed screen for entering the user name and the organization name.
I
am not sure it provides an underlying framework for storing the data

entered
though, but one could easily overcome this by creating a couple of

registry
entries in the Registry Editor (I mean one of the Deployment Project

editors
here, not regedit.exe) and specifying their values to be taken from the
properties associated with the "Name" and "Organization" text boxes on

the "Registration Information" screen.

As for the first one, I believe this can be retrieved as the last
modification date for any other file at the very least?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Thom Little" <th**@tlanet.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Are the following values available at execution time of a windows
application ...

- Date the module (assembly) was compiled.
- User Name specified during installation.
- Organization Name specified during installation.

What was the source of your information?

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



Nov 16 '05 #9

P: n/a
Hi Thom,

Do you still have any concern on this issue? For your deployment concern, I
think some other group may be more suitable.

Please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #10

P: n/a
In the other newsgroup I was informed that it could be accomplished using
Orca.

To do this I have installed the Installation SDK and then installed Orca.

There is a dialog present in the .miss file that is used for this vary
purpose.

I can not determine how to modify the .miss file using Orca to enable this
action to occur.

The latest message on this subject appears to be a 180 degree reversal of
the previous course of action with a statement that it is "not an easy job"
to enable the behavior in question.

With regards to resolution ... your guess is as good as mine ... I guess I
don't know how to appropriately ask the question.

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

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:B4*************@cpmsftngxa10.phx.gbl...
Hi Thom,

Do you still have any concern on this issue? For your deployment concern, I think some other group may be more suitable.

Please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #11

P: n/a
In my previous message .miss should have been .msi

Sorry.

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

"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
In the other newsgroup I was informed that it could be accomplished using
Orca.

To do this I have installed the Installation SDK and then installed Orca.

There is a dialog present in the .miss file that is used for this vary
purpose.

I can not determine how to modify the .miss file using Orca to enable this
action to occur.

The latest message on this subject appears to be a 180 degree reversal of
the previous course of action with a statement that it is "not an easy job" to enable the behavior in question.

With regards to resolution ... your guess is as good as mine ... I guess I
don't know how to appropriately ask the question.

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

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:B4*************@cpmsftngxa10.phx.gbl...
Hi Thom,

Do you still have any concern on this issue? For your deployment concern,
I
think some other group may be more suitable.

Please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no

rights.


Nov 16 '05 #12

P: n/a
Hi Thom,

You may try the Windows Installer API function to show the user name and
organization name of a installed product:

[DllImport("msi", CharSet=CharSet.Auto)]
public static extern USERINFOSTATE MsiGetUserInfo(
string szProduct, // product code, string GUID
string UserNameBuf, // return user name
ref int UserNameBufLen, // in/out buffer character count
string OrgNameBuf, // return company name
ref int OrgNameBufLen, // in/out buffer character count
string SerialBuf, // return product serial number
ref int SerialBufLen); // in/out buffer character count

// Obtain and store user info and PID from installation wizard (firstrun)
public enum USERINFOSTATE
{
USERINFOSTATE_MOREDATA = -3, // return buffer overflow
USERINFOSTATE_INVALIDARG = -2, // invalid function argument
USERINFOSTATE_UNKNOWN = -1, // unrecognized product
USERINFOSTATE_ABSENT = 0, // user info and PID not initialized
USERINFOSTATE_PRESENT = 1, // user info and PID initialized
};

To use the API:

string user = new string(new char[100]);
int userint = 100;
string org = new string(new char[100]);
int orgint = 100;
string serial = new string(new char[100]);
int serialint = 100;
USERINFOSTATE s = MsiGetUserInfo("{E05F0409-0E9A-48A1-AC04-E35E3033604A}",
user, ref userint, org, ref orgint, serial, ref serialint);
if (s == USERINFOSTATE.USERINFOSTATE_PRESENT)
{
Console.WriteLine(user.Substring(0, userint));
Console.WriteLine(org.Substring(0,orgint));
}

However, for the Setup project to register the user name and organization
name into the registry, the user must have a valid ProductID to validate:

RegisterUser Action
http://msdn.microsoft.com/library/de...us/msi/setup/r
egisteruser_action.asp

As we can see, without a valid ProductID, the RegisterUser action will not
be execute.

We have 2 options here:

1. Change "ShowSerialNumber" property of the "Customer Information" dialog
to true. So the user has the option to input one product ID.

2. If we don't want the user to worry about the product ID, we can also use
Orca to input a default valid product ID into the "Property" table:

Property = PIDKEY
Value = 123-1234567.

I hope the information is useful to you.

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.

Nov 16 '05 #13

P: n/a
Sorry, there should be no dot after "Value = 123-1234567".

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.

Nov 16 '05 #14

P: n/a
Some of your responses precipitate more work when used. That was the case
with this one. Your approach is exactly what I needed and I now extract the
information from the installed program. This approach is now added to my
"toolbox" for use in other applications.

There is a lack of agreement on the term ProductID and Serial Number in the
documentation. Some references use one term and some use the other when
referring to the Product ID.

When testing, I set the Serial number (typed in serial number) in the
installer to a bogus value. This value is now being maintained through all
future installs and uninstalls. I would like to change or delete it.

How can I change or delete the Serial number that I entered darning setup?

Thanks again Felix. This thread has opened a whole new way that I think
about C# solutions that are "closer to" the operating system.

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

"Felix Wang" <v-*****@online.microsoft.com> wrote in message
news:t2*************@cpmsftngxa10.phx.gbl...
Hi Thom,

You may try the Windows Installer API function to show the user name and
organization name of a installed product:

[DllImport("msi", CharSet=CharSet.Auto)]
public static extern USERINFOSTATE MsiGetUserInfo(
string szProduct, // product code, string GUID
string UserNameBuf, // return user name
ref int UserNameBufLen, // in/out buffer character count
string OrgNameBuf, // return company name
ref int OrgNameBufLen, // in/out buffer character count
string SerialBuf, // return product serial number
ref int SerialBufLen); // in/out buffer character count

// Obtain and store user info and PID from installation wizard (firstrun)
public enum USERINFOSTATE
{
USERINFOSTATE_MOREDATA = -3, // return buffer overflow
USERINFOSTATE_INVALIDARG = -2, // invalid function argument
USERINFOSTATE_UNKNOWN = -1, // unrecognized product
USERINFOSTATE_ABSENT = 0, // user info and PID not initialized
USERINFOSTATE_PRESENT = 1, // user info and PID initialized
};

To use the API:

string user = new string(new char[100]);
int userint = 100;
string org = new string(new char[100]);
int orgint = 100;
string serial = new string(new char[100]);
int serialint = 100;
USERINFOSTATE s = MsiGetUserInfo("{E05F0409-0E9A-48A1-AC04-E35E3033604A}",
user, ref userint, org, ref orgint, serial, ref serialint);
if (s == USERINFOSTATE.USERINFOSTATE_PRESENT)
{
Console.WriteLine(user.Substring(0, userint));
Console.WriteLine(org.Substring(0,orgint));
}

However, for the Setup project to register the user name and organization
name into the registry, the user must have a valid ProductID to validate:

RegisterUser Action
http://msdn.microsoft.com/library/de...us/msi/setup/r egisteruser_action.asp

As we can see, without a valid ProductID, the RegisterUser action will not
be execute.

We have 2 options here:

1. Change "ShowSerialNumber" property of the "Customer Information" dialog
to true. So the user has the option to input one product ID.

2. If we don't want the user to worry about the product ID, we can also use Orca to input a default valid product ID into the "Property" table:

Property = PIDKEY
Value = 123-1234567.

I hope the information is useful to you.

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.

Nov 16 '05 #15

P: n/a
Hi Thom,

Thanks for your update. However, through Windows Installer APIs, we can
only read the user information of a product. We have no way to alter the
username, organization or PID after the installation via API. The user
information is supposed to be entered during the installation.

In addition, as far as I know, once we uninstall the product, the PID
should no longer be tracked. Could you elaborate a little bit more on "This
value is now being maintained through all future installs and uninstalls"?

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.

Nov 16 '05 #16

P: n/a
I Install the application.
In Customer Information I enter a serial number 777-7777777
It is accepted and the install continues.

I uninstall the application.

I install the application.
In Customer Information I enter a serial number 417-1000000
It presents an error dialog of ...
The key 417-1000000 is not valid. Verify you entered the correct key.
I respond OK
In Customer Information I enter a serial number 777-7777777
It is accepted and the install continues.

I want to change or delete the key that is being maintained on the machine
to which the install is being performed. (I need to have this capability as
a corrective measure if the customer enters a key and then forgets that they
entered and is prevented from installing the application.)

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

"Felix Wang" <v-*****@online.microsoft.com> wrote in message
news:%2***************@cpmsftngxa10.phx.gbl...
Hi Thom,

Thanks for your update. However, through Windows Installer APIs, we can
only read the user information of a product. We have no way to alter the
username, organization or PID after the installation via API. The user
information is supposed to be entered during the installation.

In addition, as far as I know, once we uninstall the product, the PID
should no longer be tracked. Could you elaborate a little bit more on "This value is now being maintained through all future installs and uninstalls"?

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.

Nov 16 '05 #17

P: n/a
Felix:

You already replied to this issue in ...

microsoft.public.dotnet.framework.windowsforms

.... showing how to delete the Registry key.

Thank you.

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

"Thom Little" <th**@tlanet.net> wrote in message
news:eC**************@TK2MSFTNGP12.phx.gbl...
I Install the application.
In Customer Information I enter a serial number 777-7777777
It is accepted and the install continues.

I uninstall the application.

I install the application.
In Customer Information I enter a serial number 417-1000000
It presents an error dialog of ...
The key 417-1000000 is not valid. Verify you entered the correct key.
I respond OK
In Customer Information I enter a serial number 777-7777777
It is accepted and the install continues.

I want to change or delete the key that is being maintained on the machine
to which the install is being performed. (I need to have this capability as a corrective measure if the customer enters a key and then forgets that they entered and is prevented from installing the application.)

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

"Felix Wang" <v-*****@online.microsoft.com> wrote in message
news:%2***************@cpmsftngxa10.phx.gbl...
Hi Thom,

Thanks for your update. However, through Windows Installer APIs, we can
only read the user information of a product. We have no way to alter the
username, organization or PID after the installation via API. The user
information is supposed to be entered during the installation.

In addition, as far as I know, once we uninstall the product, the PID
should no longer be tracked. Could you elaborate a little bit more on

"This
value is now being maintained through all future installs and uninstalls"?
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.


Nov 16 '05 #18

P: n/a
Hi Thom,

I will reply you in "microsoft.public.dotnet.framework.windowsform s". You
may have some misunderstanding on the PID. It is not well documented:

http://msdn.microsoft.com/library/de...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."

For any further issues, let's discuss them in the post under
"microsoft.public.dotnet.framework.windowsform s".

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.

Nov 16 '05 #19

P: n/a
Felix:

Your approach works perfectly with the three Windows XP machines on which I
installed it. It returns USERINFOSTATE_PRESENT.

Your approach does not work on either of two Windows 2000 machines on which
I installed it. It returns USERINFOSTATE_UNKNOWN.

Any ideas?

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

"Felix Wang" <v-*****@online.microsoft.com> wrote in message
news:t2*************@cpmsftngxa10.phx.gbl...
Hi Thom,

You may try the Windows Installer API function to show the user name and
organization name of a installed product:

[DllImport("msi", CharSet=CharSet.Auto)]
public static extern USERINFOSTATE MsiGetUserInfo(
string szProduct, // product code, string GUID
string UserNameBuf, // return user name
ref int UserNameBufLen, // in/out buffer character count
string OrgNameBuf, // return company name
ref int OrgNameBufLen, // in/out buffer character count
string SerialBuf, // return product serial number
ref int SerialBufLen); // in/out buffer character count

// Obtain and store user info and PID from installation wizard (firstrun)
public enum USERINFOSTATE
{
USERINFOSTATE_MOREDATA = -3, // return buffer overflow
USERINFOSTATE_INVALIDARG = -2, // invalid function argument
USERINFOSTATE_UNKNOWN = -1, // unrecognized product
USERINFOSTATE_ABSENT = 0, // user info and PID not initialized
USERINFOSTATE_PRESENT = 1, // user info and PID initialized
};

To use the API:

string user = new string(new char[100]);
int userint = 100;
string org = new string(new char[100]);
int orgint = 100;
string serial = new string(new char[100]);
int serialint = 100;
USERINFOSTATE s = MsiGetUserInfo("{E05F0409-0E9A-48A1-AC04-E35E3033604A}",
user, ref userint, org, ref orgint, serial, ref serialint);
if (s == USERINFOSTATE.USERINFOSTATE_PRESENT)
{
Console.WriteLine(user.Substring(0, userint));
Console.WriteLine(org.Substring(0,orgint));
}

However, for the Setup project to register the user name and organization
name into the registry, the user must have a valid ProductID to validate:

RegisterUser Action
http://msdn.microsoft.com/library/de...us/msi/setup/r egisteruser_action.asp

As we can see, without a valid ProductID, the RegisterUser action will not
be execute.

We have 2 options here:

1. Change "ShowSerialNumber" property of the "Customer Information" dialog
to true. So the user has the option to input one product ID.

2. If we don't want the user to worry about the product ID, we can also use Orca to input a default valid product ID into the "Property" table:

Property = PIDKEY
Value = 123-1234567.

I hope the information is useful to you.

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.

Nov 16 '05 #20

P: n/a
Hi Thom,

I have tested the code on Windows 2000. It works fine.

Since the function returns USERINFOSTATE_UNKNOWN on your side, it seems to
me that you are using the wrong ProductCode. Please double check this point.

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.

Nov 16 '05 #21

P: n/a
Felix:

Correct ... I was erroneously using the ProductID in your snippet. I'm not
sure what product it is for. When I located and inserted the ProductID
reported by Visual Studio for my application it worked correctly on both
Windows XP and Windows 2000.

Thanks.

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

"Felix Wang" <v-*****@online.microsoft.com> wrote in message
news:TP**************@cpmsftngxa10.phx.gbl...
Hi Thom,

I have tested the code on Windows 2000. It works fine.

Since the function returns USERINFOSTATE_UNKNOWN on your side, it seems to
me that you are using the wrong ProductCode. Please double check this point.
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.

Nov 16 '05 #22

P: n/a
Hi Thom,

The ProductCode I used was for VS.Net Enterprise Architect 2003 ;-)

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

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.

Nov 16 '05 #23

This discussion thread is closed

Replies have been disabled for this discussion.