Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

cdrom script ErroR... what gives?


Recommended Posts


  • 3 weeks later...

for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\wpi.icon set CDROM=%%i:

echo Found CD-Rom as drive %CDROM%

This is what I use and usually have my disk in a lower drive without the other drives having crap in them.

Notice that i have one more % try this it is the only thing I can think of.

**** I just got the same prob.

Link to post
Share on other sites
  • 2 weeks later...

Hi guys.

Try the following

for %i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %i: ( if exist %i:\WIN51 set CDROM=%i: )

If you run directly form command prompt use only 1 % sign.

In a batch script (.bat, .cmd) you'll have to use 2 % signs.

Replace WIN51 with the file name you're looking for.

This script first looks, If a drive letter exists and only checks for a file, if it does. Works fine on my machine.

A simple tryout: Open a command prompt and execute this:

if exist Z:\ (echo yes) else (echo no)

replace Z with any other drive letter.

For CD-ROMS the answer is yes, if a media in inserted and no, if the dirve letter exists, but no media is found. Try it for you CD-Rom drive letters. Do you get an answer (yes/no) or do you get the error message ?

Link to post
Share on other sites

it would be nice hasi if u could make some sort of guide on explanation

about the variables of your wpi.cmd

u should make a wpi.cmd for guiRunOnce and one to be run by RunonceEX.cmd via cdrom.

it would really help most of us.

Link to post
Share on other sites

@Soulin

Tought about you comment. Can't see any solution. Any sense in there ? Or are you just trying to get your third star, spamming around in the forum ? Well - you're welcome. Give an explaination of yout thoughts (1 post more !).

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...