Solved

%CD-ROM% = %SystemRoot% for the CD Rom drive?

Posted on 2008-10-03
3
833 Views
Last Modified: 2008-10-06
%SystemRoot%
of course, is the designation for the C:\WINDOWS\ or the C:\WINNT\ directory, depending on our PC

how do i declare the CD-ROM drive?   %CD-ROM% ?
and what if there are more than one CD-ROM drive?
0
Comment
Question by:MacRena
  • 2
3 Comments
 
LVL 2

Expert Comment

by:UnicornBoy
ID: 22636866
the variables between percentage signs are called "Environment Variables"...
some of them are hidden like the one you mentioned: %SystemRoot%

all of the defined Environment Variables could seen in this place:
for XP: control panel / system (properties) / advanced tab / Environment Variables (button on the bottom!)

some of them are defined by default when you install windows, others are defined by installing programs.

BUT

there is no variable that would represent the CD-Rom drive path...

I don't know want purpose you have for looking for such environment variable, but there are lots of solutions for any kind of operation you may want to perform...

tell me what you want to do with for example %CD-ROM%, then I'll tell you exactly what's the solution...
0
 
LVL 4

Author Comment

by:MacRena
ID: 22636898
my customer wants to reference a file in a folder off the root of the CD drive, in a VB program that's running from the C:\ drive.
0
 
LVL 2

Accepted Solution

by:
UnicornBoy earned 50 total points
ID: 22636991
if he is programming in Visual Basic he/she easily could get all removable drives and paths using windows APIs...

there is a example I found on internet:  http://www.mvps.org/access/api/api0003.htm

for testing it, open an empty VB6 project, copy&paste code
call the sub "sListAllDrives" in form_onLoad...

it will print debugs like this:

    Local drive :  C:\
Removable drive :  D:\
Removable drive :  E:\
Removable drive :  H:\


analyze the code and extract what you want...
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lot of troubles with windows 10 7 54
winscp where are logs stored 3 36
Microservices and Windows apps 5 26
Problem to Alipay 10 24
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

832 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