Solved

deployment:    [xxxx]?  for directory letter of os

Posted on 2004-08-24
7
241 Views
Last Modified: 2010-08-05

I am preparing a deployment for a program using .net deployment project.

I'm looking at the DefaultLocation property and I imagine that that might be where the product tries to get installed if user runs the setup and accepts all the defaults as they appear...

The question is, there must be some token which refers to the directory in which the operating system is installed.  

For example [ProgramFilesFoler], I believe, refers to
C:\Program Files   (should o.s. be installed on c: drive, as typically is the case)

Is there a token I can use to refer to the root directory in which the operating system is installed.

For example, if xp is installed on C: then
[Root] might give you C:\

(Only I don't know what that token is...  I'm just guessing that it might be Root)


How do I set my DefaultLocation property of the Application Foler to point to   x:\Apps directory, where x refers to the operating system in which program is installed....  Apps already exists as a directory...

I imagine that I might set the Manufacturer to be Apps, but it is trying to install to Apps\ and is thinking that Apps is some network directory location....


0
Comment
Question by:kamleshmistry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 19

Expert Comment

by:Desp
ID: 11882927
MessageBox.Show(Environment.GetEnvironmentVariable("HOMEDRIVE")) ' The drive where the OS is installed
MessageBox.Show(Environment.GetEnvironmentVariable("WINDIR")) ' The Directory where the OS is installed
0
 
LVL 19

Expert Comment

by:Desp
ID: 11883027
infact this will also do the same for you:
MessageBox.Show(Environment.GetEnvironmentVariable("SYSTEMDRIVE")) ' The drive where the OS is installed
MessageBox.Show(Environment.GetEnvironmentVariable("SYSTEMROOT")) ' The Directory where the OS is installed
0
 

Author Comment

by:kamleshmistry
ID: 11883123

I don't know if I can use Environment.xxx.xxx when setting a property.... maybe.... i'll give it a try....
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:kamleshmistry
ID: 11883330
 
Desp,  

Nice try, but no cigar...

it doesn't work...  Not in the context of a field property....
You cannot set property to Environment.xxx.xxx..... etc...

There has to be a token which stands for the root directory...
I don't know what that token is...

It has to be something like
[Root]

What we are dealing with is application deployment app.  


0
 
LVL 19

Expert Comment

by:Desp
ID: 11889479
[ROOTDRIVE]
0
 
LVL 19

Assisted Solution

by:Desp
Desp earned 100 total points
ID: 11889505
try
[PrimaryVolumePath]
as well
0
 
LVL 1

Accepted Solution

by:
MADeon earned 300 total points
ID: 11909477
According to the windows installer sdk [WindowsVolume] should be what you're looking for. The sdk also states that "the values... are guaranteed to end in a directory separator", so you probably want to use [WindowsVolume]Apps rather than [WindowsVolume]\Apps.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question