Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Vista Setup Project - Rights Issue

Reply
 
Old 03-13-2009   #1 (permalink)
Smurfman-MSDN


 
 

Vista Setup Project - Rights Issue

Using Vista Ultimate x64 and Visual Studio 2008 SP1

I have a solution with a setup project in it - everything is configured for
x86

I have several registry keys created as part of the installer.
Two keys are created as REG_SZ

Process Begin
Process End

By default I assign 2 values to the keys in the Registry editor for the
Setup Project
Process Begin is assigned "#8:30:00 AM#
Process End is assigned "#4:55:00 PM#

When the installer runs, I receive an error telling me:
"Could not write value Process Begin to key \Software\MYCompany\MyApp.
Verify that you have sufficient access to that key, or contact your support
personnell."

I can continue...

I get the same thing again for Process End

I can continue

The program installs. And every registry key is created, even the captured
values during the install pages are stored. EXPECT the two in question.

I suspect that it has to do with the data I am trying to write to the key
#8:30:00 AM#

Any suggestions?
J


My System SpecsSystem Spec
Old 03-15-2009   #2 (permalink)
jacky kwok


 
 

Re: Vista Setup Project - Rights Issue

Smurfman-MSDN wrote:
Quote:

> Thanks for the links - however I do not believe this is the issue.
>
> As mentioned, the installer project is creating about 23 values for various
> uses.
>
> Only 2 are not being created. The two mentioned.
> I suspect that the issue is related to the default value I am assigning in
> the editor of the project.
>
> Specifically the leading # sign.
>
> Thanks
> J
>
Yes, I also experenced the same problem. If use "#" in the registry key
string leading, the installer will always fail.

By using tool "Orca" to check an installer msi Registry table, I found
that leading "#" is used to indicate it is an integer key.
Hence, all the registry record with leading "#" will be considered as
Integer an so that it will fail if the value is not an integer.

--
Jacky Kwok
jacky@xxxxxx_DOT_cuhk_DOT_edu_DOT_hk
My System SpecsSystem Spec
Old 03-16-2009   #3 (permalink)
Jie Wang [MSFT]


 
 

RE: Vista Setup Project - Rights Issue

Hello Jeff,

Jacky is right (thanks for sharing, Jacky). And let me share some more
detailed information with you.

In Windows Installer, we must make sure that the characters following a #
in a registry value are numeric. In your case, the value you set in the
Setup Project should be something like "##8:30:00 AM#". Note the double #,
that means the following characters don't have to be numeric.

There are tools that can be used to validate your MSI file before sending
it to deployment. As Jacky mentioned, Orca is one of the tools and it is
free for download from Microsoft website.

In case you need it, you can find it (contained in Windows Installer SDK)
here:
http://www.microsoft.com/downloads/d...C14-2626-4846-
BB51-DDCE49D6FFB6&displaylang=en

After installing the Windows SDK, you can find Orca.msi from the SDK's
Tools folder. Then you need to install orca.msi.

After installing orca.msi, you can find Orca in your start menu.

Then you can consider the following steps to validate your MSI file:

1. Open your own MSI file with Orca.
2. From Tools menu, choose Validate
3. In the Validation Output dialog, click the Go button.
4. Wait for the validation process to finish.

When the validation process is finished, you may see the following error
message:
ICE70 INFO ICE70 - Checks that the characters following a # in a registry
value are numeric
ICE70 INFO Created 07/14/1999. Last Modified 07/21/1999.
ICE70 ERROR The value '#8:30:00 AM#' is an invalid numeric value for
registry entry _XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. If you meant to use a
string, then the string value entry must be preceded by ## not #.

So, all we have to do is close Orca, back to Visual Studio, change the
value from #8:30:00 AM# to ##8:30:00 AM#, and recompile.

For more information on ICE70, you may want to read the following documents:
http://msdn.microsoft.com/en-us/libr...20(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...06(VS.85).aspx

And for ICEs (Internal Consistency Evaluators), here is the link:
http://msdn.microsoft.com/en-us/libr...54(VS.85).aspx

Please kindly let us know if this works for you.

Regards,

Jie Wang (jiewan@xxxxxx, remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

My System SpecsSystem Spec
Old 03-18-2009   #4 (permalink)
Smurfman-MSDN


 
 

RE: Vista Setup Project - Rights Issue

First I appoligize, I did reply but it appears that it never posted.

Thank you both jacky and Jie.

I did try the ## setting and this worked perfectly.
I did not get the Orca program but thank you for the link.

This does raise a couple of questions that perhaps you can answer.
1) Why did it work on XP?
2) If in the Registry builder - I am adding a STRING value per the context
menu of the compiler, why does it not know that I am entering a string and
not an integer?
3) If the Registry builder is a string value - why doesnt the compiler
accept this and build it accordingly for the installer package.
4) Do I need to keep the same logic when setting the string value
programatically - for example #8:00:00 AM# to be stored in a REG_SZ value -
using the My.Computer.Registry.SetValue function?

Thanks
J

""Jie Wang [MSFT]"" wrote:
Quote:

> Hello Jeff,
>
> Jacky is right (thanks for sharing, Jacky). And let me share some more
> detailed information with you.
>
> In Windows Installer, we must make sure that the characters following a #
> in a registry value are numeric. In your case, the value you set in the
> Setup Project should be something like "##8:30:00 AM#". Note the double #,
> that means the following characters don't have to be numeric.
>
> There are tools that can be used to validate your MSI file before sending
> it to deployment. As Jacky mentioned, Orca is one of the tools and it is
> free for download from Microsoft website.
>
> In case you need it, you can find it (contained in Windows Installer SDK)
> here:
> http://www.microsoft.com/downloads/d...C14-2626-4846-
> BB51-DDCE49D6FFB6&displaylang=en
>
> After installing the Windows SDK, you can find Orca.msi from the SDK's
> Tools folder. Then you need to install orca.msi.
>
> After installing orca.msi, you can find Orca in your start menu.
>
> Then you can consider the following steps to validate your MSI file:
>
> 1. Open your own MSI file with Orca.
> 2. From Tools menu, choose Validate
> 3. In the Validation Output dialog, click the Go button.
> 4. Wait for the validation process to finish.
>
> When the validation process is finished, you may see the following error
> message:
> ICE70 INFO ICE70 - Checks that the characters following a # in a registry
> value are numeric
> ICE70 INFO Created 07/14/1999. Last Modified 07/21/1999.
> ICE70 ERROR The value '#8:30:00 AM#' is an invalid numeric value for
> registry entry _XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. If you meant to use a
> string, then the string value entry must be preceded by ## not #.
>
> So, all we have to do is close Orca, back to Visual Studio, change the
> value from #8:30:00 AM# to ##8:30:00 AM#, and recompile.
>
> For more information on ICE70, you may want to read the following documents:
> http://msdn.microsoft.com/en-us/libr...20(VS.85).aspx
> http://msdn.microsoft.com/en-us/libr...06(VS.85).aspx
>
> And for ICEs (Internal Consistency Evaluators), here is the link:
> http://msdn.microsoft.com/en-us/libr...54(VS.85).aspx
>
> Please kindly let us know if this works for you.
>
> Regards,
>
> Jie Wang (jiewan@xxxxxx, remove 'online.')
>
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@xxxxxx.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business days is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
My System SpecsSystem Spec
Old 03-19-2009   #5 (permalink)
Jie Wang [MSFT]


 
 

RE: Vista Setup Project - Rights Issue

Hi Jeff,

Let me try to answer your questions:

1) Why did it work on XP?

No, it shouldn't. I did the same test on various platforms - XP / Vista /
7, each with different versions of Windows Installer - 3.01 on XP, 4.0 on
Vista and 5.0 on Windows 7, got consistent error message. Since I can't see
your setup project, I'm not sure why exactly it works for you on XP. If
you'd like to, you can send me a small sample so I can check it up.

2) If in the Registry builder - I am adding a STRING value per the context
menu of the compiler, why does it not know that I am entering a string and
not an integer?
3) If the Registry builder is a string value - why doesnt the compiler
accept this and build it accordingly for the installer package.

Let me combine the 2nd & 3rd questions' answer together: It does know what
type of data you're entering. The problem is how the MSI package stores
these data.

Let's study a simple sample:

Say we have three values to write to the registry: TestString, TestBinary,
TestDWORD. In Visual Studio, we create three corresponding keys, and enter
their values.
Please note that the TestDWORD will not accept "10AD", we'll have to enter
"0x10AD" - the hex form, and it will be transformed into dec from 4269
automatically.

Then we compile the setup project, use Orca (yeah we have to use it again
to see what exactly happened) to open the compiled MSI, find the Registry
section, we'll see how these keys are stored:

TestString 10AD
TestBinary #x10AD
TestDWORD #4269

So, it is clear now in MSI it uses prefix like #x & # to differentiate data
types. There is no way for Visual Studio to make MSI remeber the data type
except using these prefixes. The only problem within Visual Studio Setup
Project editor is, it doesn't check whether or not a String value we
entered starts with a # sign. It will be better to warn us at compile time
with information like "if you want to start your string with the # sign,
the string value entry must be preceded by ## not #.".

One more interesting test: if we create a *string* key in the editor, with
its value #123, after we installed the MSI, we'll find the value type is
DWORD instead of string!

If you're interested in the details of the prefix rules, this is the
document for it:
http://msdn.microsoft.com/en-us/library/aa371168.aspx

4) Do I need to keep the same logic when setting the string value
programatically - for example #8:00:00 AM# to be stored in a REG_SZ value -
using the My.Computer.Registry.SetValue function?

No. As we said, this is the MSI rule, which doesn't apply to VB programming.

Hope this answered your questions clearly. But again, if you have more
questions or concerns, don't hesitate to post here.

Regards,

Jie Wang (jiewan@xxxxxx, remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

My System SpecsSystem Spec
Old 03-20-2009   #6 (permalink)
Smurfman-MSDN


 
 

RE: Vista Setup Project - Rights Issue

Jie,
Thanks for the great notes.

I am willing to bet that while I thought it worked on XP, the keys were not
in the original install MSI that I created. And we manually created after
the fact for testing, that is the only thing I can think of.

This raises two other questions - but I will post one as a new thread.

Related to the whole String, Binary or DWORD.

How would I store a REG_MULTI_SZ value in the Registry Editor for the Setup
Project - I don't see that as an option.

I did however notice that if I write a a REG_MULTI_SZ it does get converted
in the registry.

Thanks again for all of the great info - I have learned a lot on this topic.

J

""Jie Wang [MSFT]"" wrote:
Quote:

> Hi Jeff,
>
> Let me try to answer your questions:
>
> 1) Why did it work on XP?
>
> No, it shouldn't. I did the same test on various platforms - XP / Vista /
> 7, each with different versions of Windows Installer - 3.01 on XP, 4.0 on
> Vista and 5.0 on Windows 7, got consistent error message. Since I can't see
> your setup project, I'm not sure why exactly it works for you on XP. If
> you'd like to, you can send me a small sample so I can check it up.
>
> 2) If in the Registry builder - I am adding a STRING value per the context
> menu of the compiler, why does it not know that I am entering a string and
> not an integer?
> 3) If the Registry builder is a string value - why doesnt the compiler
> accept this and build it accordingly for the installer package.
>
> Let me combine the 2nd & 3rd questions' answer together: It does know what
> type of data you're entering. The problem is how the MSI package stores
> these data.
>
> Let's study a simple sample:
>
> Say we have three values to write to the registry: TestString, TestBinary,
> TestDWORD. In Visual Studio, we create three corresponding keys, and enter
> their values.
> Please note that the TestDWORD will not accept "10AD", we'll have to enter
> "0x10AD" - the hex form, and it will be transformed into dec from 4269
> automatically.
>
> Then we compile the setup project, use Orca (yeah we have to use it again
> to see what exactly happened) to open the compiled MSI, find the Registry
> section, we'll see how these keys are stored:
>
> TestString 10AD
> TestBinary #x10AD
> TestDWORD #4269
>
> So, it is clear now in MSI it uses prefix like #x & # to differentiate data
> types. There is no way for Visual Studio to make MSI remeber the data type
> except using these prefixes. The only problem within Visual Studio Setup
> Project editor is, it doesn't check whether or not a String value we
> entered starts with a # sign. It will be better to warn us at compile time
> with information like "if you want to start your string with the # sign,
> the string value entry must be preceded by ## not #.".
>
> One more interesting test: if we create a *string* key in the editor, with
> its value #123, after we installed the MSI, we'll find the value type is
> DWORD instead of string!
>
> If you're interested in the details of the prefix rules, this is the
> document for it:
> http://msdn.microsoft.com/en-us/library/aa371168.aspx
>
> 4) Do I need to keep the same logic when setting the string value
> programatically - for example #8:00:00 AM# to be stored in a REG_SZ value -
> using the My.Computer.Registry.SetValue function?
>
> No. As we said, this is the MSI rule, which doesn't apply to VB programming.
>
> Hope this answered your questions clearly. But again, if you have more
> questions or concerns, don't hesitate to post here.
>
> Regards,
>
> Jie Wang (jiewan@xxxxxx, remove 'online.')
>
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@xxxxxx.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business days is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
My System SpecsSystem Spec
Old 03-20-2009   #7 (permalink)
Smurfman-MSDN


 
 

RE: Vista Setup Project - Rights Issue

Jie

Nevermind my last post - I found the answer in that link you gave me with
the [~] being a seperator for the values.

This will work great.

You can close this item.

Thanks a ton!
J

As a sidebar - I am getting a ton of Service Unavailable these last 2-3 days
when trying to update posts or look at other replies from MS people. Thought
I would let you know.

Thanks again.
J

""Jie Wang [MSFT]"" wrote:
Quote:

> Hi Jeff,
>
> Let me try to answer your questions:
>
> 1) Why did it work on XP?
>
> No, it shouldn't. I did the same test on various platforms - XP / Vista /
> 7, each with different versions of Windows Installer - 3.01 on XP, 4.0 on
> Vista and 5.0 on Windows 7, got consistent error message. Since I can't see
> your setup project, I'm not sure why exactly it works for you on XP. If
> you'd like to, you can send me a small sample so I can check it up.
>
> 2) If in the Registry builder - I am adding a STRING value per the context
> menu of the compiler, why does it not know that I am entering a string and
> not an integer?
> 3) If the Registry builder is a string value - why doesnt the compiler
> accept this and build it accordingly for the installer package.
>
> Let me combine the 2nd & 3rd questions' answer together: It does know what
> type of data you're entering. The problem is how the MSI package stores
> these data.
>
> Let's study a simple sample:
>
> Say we have three values to write to the registry: TestString, TestBinary,
> TestDWORD. In Visual Studio, we create three corresponding keys, and enter
> their values.
> Please note that the TestDWORD will not accept "10AD", we'll have to enter
> "0x10AD" - the hex form, and it will be transformed into dec from 4269
> automatically.
>
> Then we compile the setup project, use Orca (yeah we have to use it again
> to see what exactly happened) to open the compiled MSI, find the Registry
> section, we'll see how these keys are stored:
>
> TestString 10AD
> TestBinary #x10AD
> TestDWORD #4269
>
> So, it is clear now in MSI it uses prefix like #x & # to differentiate data
> types. There is no way for Visual Studio to make MSI remeber the data type
> except using these prefixes. The only problem within Visual Studio Setup
> Project editor is, it doesn't check whether or not a String value we
> entered starts with a # sign. It will be better to warn us at compile time
> with information like "if you want to start your string with the # sign,
> the string value entry must be preceded by ## not #.".
>
> One more interesting test: if we create a *string* key in the editor, with
> its value #123, after we installed the MSI, we'll find the value type is
> DWORD instead of string!
>
> If you're interested in the details of the prefix rules, this is the
> document for it:
> http://msdn.microsoft.com/en-us/library/aa371168.aspx
>
> 4) Do I need to keep the same logic when setting the string value
> programatically - for example #8:00:00 AM# to be stored in a REG_SZ value -
> using the My.Computer.Registry.SetValue function?
>
> No. As we said, this is the MSI rule, which doesn't apply to VB programming.
>
> Hope this answered your questions clearly. But again, if you have more
> questions or concerns, don't hesitate to post here.
>
> Regards,
>
> Jie Wang (jiewan@xxxxxx, remove 'online.')
>
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@xxxxxx.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business days is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
My System SpecsSystem Spec
Old 03-23-2009   #8 (permalink)
Jie Wang [MSFT]


 
 

RE: Vista Setup Project - Rights Issue

Regarding the Service Unavailable problem, I have reported it to
appropriate people and their will take a look.

If you're still having the problem, just email me or the msdnmg@xxxxxx dot
com for assistance.

Thanks,

Jie Wang (jiewan@xxxxxx, remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
VS 2008 Setup Project, shortcut problem .NET General
Checking serial key with setup project. .NET General
Setup project Custom Action fails under Vista .NET General
MSI Installer VS 2005 Setup Project .NET General
Advertised Shortcuts in a setup and deployment project .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46