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. ×

A New Cd-switching Utility


Recommended Posts


Hi Nanaki,

Great idea as I'm trying to automate all my installations and don't have a DVD.

BUT... Sorry, there's a but, it looks like it's not working with me :(

1) Actually I use a laptop and my CD reader is external USB. If I run CDSwitch without the CD reader pluged, it fails immediately.

2) If I don't specify the CD letter (wich I usually don't know), it fails.

eg:

cdswitch "DELL_RESSOURCES" /g:LABEL

I made my personal, ugly, dos mode version of WAITCD, I'm gonna post it as soon as possible.

Hope my reports will help

Santiago

Link to post
Share on other sites

Could you run CDswitch with:

cdswitch "DELL_RESSOURCES" /g:LABEL /K

and post the contents of "c:\cdswitch.txt" afterwards? Also, please make sure that "/g:LABEL" is what you want. :) It will eject the drive wherein the disc labeled "LABEL" is.

Edited by Nanaki
Link to post
Share on other sites
Is there anyway of using this if the CD happens to have no label??

I've uploaded a version with a fix here. In my small tests, it worked with an empty label (still use double quotes "").

OK Nanaki, I got it.

As I don't know my driveletter, what I needed to do is :

cdswitch DELL_RESSOURCES 1

Ok, good to hear. :)

Edited by Nanaki
Link to post
Share on other sites
I've uploaded a version with a fix here. In my small tests, it worked with an empty label (still use double quotes "").

It detects the CD now but I can't seem to get it to do a custom label for the disc

cdswitch.exe "" X: /l:"IBM Director"

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

I now want to add the ability to search for a particular file on the CD to ensure the correct CD is inserted, since the CD I am using does not have a label.

The code I am using does not appear to be working for me. If I use a CD where the file does not exist it does not eject the disc.

cdswitch.exe "" /l:"IBM Director 5.20" /g:"X:\director\agent\windows\i386\FILES\dir5.20_agent_windows.exe"

or

cdswitch.exe "" X: /l:"IBM Director 5.20" /g:"X:\director\agent\windows\i386\FILES\dir5.20_agent_windows.exe"

Any ideas?

Link to post
Share on other sites

Alright, the stuff I'm about to say might not be fully correct, since I don't have the resources to test it and it's been a while since I've written this code.

First, if you want to EJECT the drive containing the disc with certain file:

cdswitch "" /f:"director\agent\windows\i386\FILES\dir5.20_agent_windows.exe" /l:"IBM Director 5.20"

Notice how "X:" is omitted from the path, "/f" works like this.

Second, you want to check the new disc for a file:

sorry, not possible, this required a major overhaul of the code for it to work properly. I might try and put it in quite soon (just for you :P), but first I need my laptop back for that. I'll try and see later today.

edit: try this one. I've found the disc I needed, so here's another new version.

Use this code:

cdswitch /f:"director\agent\windows\i386\FILES\dir5.20_agent_windows.exe" X: /l:"IBM Director 5.20"

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

I was going to use this on vista today.  Observations that i'd like to share:

1. Works on vista.

2. CDswitch searches for its specified file *ONLY* on optical media & not on HDD (i know i must have been daft to think otherwise :P)

3. It manages to catch the file & create entry (variable appears in registry), but %CDDRIVE% wont work on 64-bit windows until the current (logon) session is closed & restarted.

Nanaki, awesome utility this is!

Thanks :)

Edited by prathapml
Link to post
Share on other sites

Good to know it's working, thanks for testing. :)

CDswitch searches for its specified file *ONLY* on optical media & not on HDD (i know i must have been daft to think otherwise

Why, you want it to? ;)

Link to post
Share on other sites

Hmmm.... Actually i thought it searches all drive letters. So I tried to make it search for a file on one of my partitions, just to test if it works on vista.

But after that, i tested using a virtual-drive and it was working fine.

In short, searching HDD while testing would be good, but not a priority.

Its good that it searches only optical drives. :)

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...