Jump to content

A New Cd-switching Utility


Recommended Posts


@nanaki

will have a look at doing and generating the log to check errors and update.

At present I call cdswitch from the cd-rom directly using

cdswitch.exe xpsp2_apps d:

and it ejects cd1 and asks for cd2.

cd2 is then inserted and is labelled exactly as above, but it doesn't read it. It then loads windows shell as normal after what appears to be a timeout period.

If i insert cd2 as a test the autorun runs as expected and apps install

Link to comment
Share on other sites

@totoymola: tnx, I will! :P

@oioldman: sounds as normal behaviour to me. I don't have enough information tho. How are you installing? RunOnceEx/batchfiles/XPlode/...? When are you installing? T-12? GuiRunOnce? RunOnceEx? How are you using CDswitch? One batchfile/... per disc or one batchfile for all discs?

Try manually running that autorun-file with "/r". Also, try using "/rw", this will make sure CDswitch won't exit when launching the autorun-file, but just wait hidden. In this way, the original RunOnceEx/whatever won't detect that CDswitch exits, causing it to continue and exiting.

Link to comment
Share on other sites

@nanaki,

1st, thanks for your time and patience in assisting

2; i'm running from WPI (WindowsPostInstallation) app as the last application. My command is run directly from the cd as

%cdrom%\apps\misc\cdswitch.exe xpsp2_apps d: /k:c:cdswitch.txt

the log file being generated to see if any errors are encountered.

Looging at the log file, it appears as though none are generated looking at it, see below

==================
CDswitch 0.8.2 log
==================

CDswitch version: 0.8.2.0
Path to CDswitch: D:\Apps\Misc\cdswitch.exe
Resolution: 1024x768x32x85
OS: WIN_XP Service Pack 2 build 2600
Working directory: C:\
User: Administrator

Date: 14/08/2005
Time: 19:09.25

Your supplied parameters: xpsp2_apps d: /k:C:CDswitch.txt
Number of parameters detected: 3

Parameter check:
----------------

3. Parameter "/k" detected. Used to create this log.
The log will be saved at "C:CDswitch.txt".

Disc drive check:
-----------------

Detected drives:
1. d:

================
   END LOG
================

Does the length of the cd label make a difference as mine is 10chr long?

Can you think of any thing that would cause it to not run? seeing as no error is encountered

thank you again

Link to comment
Share on other sites

apologies if i'm being really dumb here but the /? help says that the basic switch you can use is exactly what i am using,

cdswitch.exe <cdlabel> <cddriveletter>

and so that is what i'm using, expecting the cd-rom to close when i close it and then it will autorun and run the autorun.inf file there in.

Are you saying i should use,

cdswitch.exe <drivelabel> <driveletter> /r:<file to be run> /rw

[edit]

Ive now managed to spot where it goes wrong.

Using the code (2nd above) where he param calls a file to run and it failing i managed to open explorer and notice that the label against the cd (D:) hasn't updated, so it doesn't recognise and so contimues.

Just need to now work out why the cd drive doesn't refresh the label quick enough.

[/edit]

Edited by oioldman
Link to comment
Share on other sites

Lol, I've completly lost it. :P

When CDswitch continues, it means that the correct disc is present, otherwise it won't continue. Maybe it can't find the file you supplied with the "/r"-parameter. Use the logging again to detect if it can find it or not.

We'll fix this problem, but first I got to understand it. :)

Link to comment
Share on other sites

ok, thanks nanaki

i run cdswitch of the cd1 as the last application on cd1 from wthin WPI.

The command i use is;

%CDROM%\Apps\Misc\cdswitch.exe xpsp2_apps d: /r:wpi.cmd /k:C:\CDswitch.txt /rw

which does work as it does eject and ask fo a cd labelled xpsp2_apps to be inserted. I do as it requests, and the standard splash screen vanishes. Then about 15-20secs later windows will continue to boot as normal, and if i open WIndowsExplorer i see the label against d: is the one from cd1.

If i refresh it shows the label from cd2, and by double-clicking this it will autorun and start wpi.cmd which inturn runs wpi.hta.

Looking at the log file it recognizes all the parameters provided and recognizes the cd-rom as drive d:, which is correct and shows no errors at all.

So i believe it is doing as needed but my pc isn't refreshing the drive label quick enough. If you need more just shout.

Link to comment
Share on other sites

Alright, a couple of quick notes (don't have a lot of time now, sorry):

1. Try placing CDswitch into the system32 folder of $OEM$. This way you can refer to it by simply typing "cdswitch PARAMETERS". You know open it from a disc being injected, I don't know if it has influence on the whole process, but it could be. It seems to work fine, so first try the other notes. :P

2. The drive label refreshing too late (if it occurs) shouldn't be a problem. If CDswitch detect the old label, it should eject the drive, and not continue.

3. Try referring EXPLICITLY to the file you want to run, like this (wpi.cmd is in the root directory of the CD-ROM I believe?):

%CDROM%\Apps\Misc\cdswitch.exe xpsp2_apps d: /r:*DRIVE*\wpi.cmd /k /rw

Or replace *DRIVE* by %CDROM% if you're not using the latest version (0.8.2).

4. If the above works, it may very well be your AutoRun kicks in. Use the "/d" parameter to disable that if it happens.

5. Note I shortened your "/k" parameter value. If you use it without providing a value, it will write to "C:\CDswitch.txt", so providing a value isn't necessary.

Now I gotta go until Sunday/Monday, so I'll hope the above (well, number 3) works. If not, I'll continue my help later on.

Link to comment
Share on other sites

  • 2 weeks later...
0.8.4 (28-08)

- Added /wl and /wt to set the position of the spawned window

- Added /i parameter to load .INI-files

- Improved .INI-loading

- Fixed broken /li, /lr and /lu when specified multiple times

- Fixed broken /b

Pretty self explanatory I presume. Next up is implementing multiple drives.

Link to comment
Share on other sites

Using WINBOM.ini [OEMRunOnce] section, I have a number of apps run.

But I have found that a few for whatever won't install.

Running them on their own work but when they are all together 2 sepecifically won't install.

Could this be because on of the other programs even though it has finished installed hasn't really finished but the WINBOM then processes the next entry anyways and it dies?

Anyway around this?

Edited by AndeeOPT
Link to comment
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...