Solved

deployment:    [xxxx]?  for directory letter of os

Posted on 2004-08-24
7
244 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
Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

 

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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

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…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 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