Solved

deployment:    [xxxx]?  for directory letter of os

Posted on 2004-08-24
7
242 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web page design problem 3 40
How does this modal gets closed? 6 41
Subtract dates in vb.net 6 32
ASP.NET VB code for check and insert in a table 4 42
Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

737 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