[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How do I access the root drive on Vista?

Posted on 2007-11-20
6
Medium Priority
?
1,474 Views
Last Modified: 2013-12-25
I have a .NET app that links to and mdb C:\Program Files\Appname\db using the line:
Dim folder As String = "C:\program Files\Celebrant Assist\db\"  etc.
I'm using a multi boot XP/Vista machine.  Vista is installed on Drive F .  For that and other Vista reasons I need to be able to address program Files, where it is  eg.
%root folder%\Program Files\Appname\db
Can anyone tell me if this will work, or what it should be.
Thanks in advance,

0
Comment
Question by:CRB1609
[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
  • 2
  • 2
6 Comments
 
LVL 59

Accepted Solution

by:
LeeTutor earned 1600 total points
ID: 20324619
Unfortunately, among the changes from XP and previous OS's that Vista has brought in is the new prohibition on programs storing data in subfolders of the Program Files folder.  In order to be able to work in legacy programs that do such things, there is the new concept of file and folder virtualization.  There is a like concept that restricts access to the registry, so there is registry virtualization also.  I understand these are "stopgap" measures which may be modified in future MS releases.  See these pages:

http://juice.altiris.com/article/2665/folder-virtualization-concepts-windows-vista

http://windowsconnected.com/blogs/jerry/archive/2005/12/19/86.aspx
File and Registry Virtualization – the good, the bad, and the ugly
0
 
LVL 51

Assisted Solution

by:Netman66
Netman66 earned 400 total points
ID: 20324818
I think the variable you are looking for is %systemdrive%.

So, "%systemdrive%\Program Files" should get you there.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 20334100
CRB1609, any feedback?
0
 

Author Comment

by:CRB1609
ID: 20368734
Hi,
Sorry about the delay in feedback.  It has been a nightmare.  The variable doesn't make any difference.  Same result as using C:\Program Files\etc...  but then the app doesn't get to run.  I think it is something to do with not being able to find the application MDW.  I'm leaving the question open while I do more testing.
CRB
0
 

Author Closing Comment

by:CRB1609
ID: 31410265
Very, very sorry for leaving this so long.  Thanks for your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

649 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