Solved

deployment:    [xxxx]?  for directory letter of os

Posted on 2004-08-24
7
238 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
  • 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now