Solved

How do I access the root drive on Vista?

Posted on 2007-11-20
6
1,463 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
  • 2
  • 2
6 Comments
 
LVL 59

Accepted Solution

by:
LeeTutor earned 400 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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

919 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

20 Experts available now in Live!

Get 1:1 Help Now