Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

deployment:    [xxxx]?  for directory letter of os

Posted on 2004-08-24
7
Medium Priority
?
248 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:Fahad Mukhtar
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:Fahad Mukhtar
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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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:Fahad Mukhtar
ID: 11889479
[ROOTDRIVE]
0
 
LVL 19

Assisted Solution

by:Fahad Mukhtar
Fahad Mukhtar earned 400 total points
ID: 11889505
try
[PrimaryVolumePath]
as well
0
 
LVL 1

Accepted Solution

by:
MADeon earned 1200 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 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