Jump to content

Recommended Posts


  • 3 weeks later...
Posted

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.

  • 2 weeks later...
Posted

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 ?

Posted

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.

Posted

@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 !).

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...