Solved

How do I access the root drive on Vista?

Posted on 2007-11-20
6
1,467 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
using Access 8 85
passing a value with stream reader AFTER a ";" 3 84
How to produce a SHA-1 hash function in vb6 in order to save it to a table 8 64
Help me. 3 71
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…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

726 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