Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

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. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Nanaki

A New Cd-switching Utility

Recommended Posts

Kelder    0

I'm still using network for app installs, so didn't need your program, but I do like the idea, and might even need it later if I'm making a networkless install for other people in my organisation.

But since I was daydreaming anyway, I just considered that it might be useful if this tool returns different errorlevels according to what happened. Mostly if user pressed Esc, so it's easier to know if the correct CD is now in the drive or not.

Share this post


Link to post
Share on other sites

Nanaki    0

Well, when you press escape, the correct disc won't be in the drive, as otherwise it've exited. :)

But 0.7 will contain error repression, so I'll implement returning errorlevels in 0.8 (shouldn't be too hard, as I already did this in an earlier release). Though I'm now focusing on error repression and making it easier ONLY. If you do want this feature very soon (0.7 will take some time to finish, even tho it's a small app), PM me, I'll code it for you.

For now, I'm working on the helpfile:

*[image deleted]*

I still have to rewrite the whole chaotic crap. :P

Edited by Nanaki

Share this post


Link to post
Share on other sites

Thank you for reminding me about the \" in the RunOnceEx Guide. I knew that before, but I'd forgotten. The more new information I shove into this old brain, the more old information seems to fall out. Last week I forgot my bank card PIN and by next week I might forget my name. :blink:

With your reminder I finally got the RunOnceEx syntax right, and the entries lodged in the registry. It seems to all work just fine, although the syntax is somewhat cumbersome.

For the record, (if anybody cares), my RunOnceEx.cmd entry is as follows:

REG ADD %KEY%\060 /VE /D "Microsoft Office XP SP3" /f
REG ADD %KEY%\060 /V 1 /D "cdswitch Office_XP %CDROM% /d /w /r:\"%CDROM%\setup.exe TRANSFORMS=Office.MST /qn"\" /f

As the RunOnceEx Guide says "If there is an application that has a series of complicated switches with lots of quotation marks, consider putting them into a separate .cmd file instead and launching from RunOnceEx, because it would get too messy putting those switches directly into RunOnceEx."

Share this post


Link to post
Share on other sites
prathapml    0
Last week I forgot my bank card PIN and by next week.......
Okay, tell me your PIN and then I shall grant you permission to forget whatever you want, including your name. :P

just kidding.... :lol:

Share this post


Link to post
Share on other sites
Nanaki    0

Well, I'm off for a week (Venise ^^). I'll continue this app when I find time. :)

Though I wanted to share this quickly: installing with multiple discs with XPlode during T-12. The problem with XPlode was that it asks back for the first disc at the end. Enter cmdlines. :)

I now use this code in my cmdlines.txt:

[COMMANDS]
"..\Install\XPlode\XPlodelog.cmd"
"cdswitch WXHFPP2_NL D: /R:D:\Install\XPlode\XPlodelog.cmd /W"

I now keep one XPlode per disc with each its own script. This results in a perfectly clean T-12 XPlode multidisc installation. :D

To determine the drive you could use the "/eg" parameter, but that's broken now. Oh well.

Share this post


Link to post
Share on other sites
Nanaki    0
Very useful tool. One issue for /r switch, if I use ALT+F4 close CD-Switching, it still launch defined application!

Unfortunatly I could not reproduce that bug. I can't even close the app with ALT-F4. Maybe I'll try to fix it soon. :)

In lighter news, I crapped out a new version. ^-^

<span style='font-size:9pt;line-height:100%'>

0.7a (25-05):

- Updated a lot of code

- Fixed error in where only the first drive could be used

- Fixed error in where using numbers to define drive wouldn't work

- Fixed error in where parameters were ignored after alternative exit methods (like an error or Alt-F4)

- Renamed %CD% from the "/eg"-parameter to %CDDRIVE%

- No more messageboxes, CDswitch doesn't give errors anymore with them

- Added "l"-parameter to check for some mistakes

- Added a help-file

</span>

<span style='font-size:12pt;line-height:100%'>

Download CDswitch 0.7a here (181k).</span>

<span style='font-size:12pt;line-height:100%'>

Download CDswitch 0.7a with helpfile here (691k).</span>

Four "critical" errors have been fixed, yay. Next to that, CDswitch is now completly "silent", as it won't give any errors any more (instead it will exit without informing you). A substitute for this method is the "l"-parameter (soon to be less confusing). It's sort of logging, but the only error it catches is when the file's not found. Meh. I needed this feature since something wasn't working for me, so now I extended it a bit.

These parameters:

cdswitch m00 1 /r:notepad /w /l:%systemdrive%\cdswitch.txt

Opening the file "cdswitch.txt" will then output something like this:

=================
CDswitch 0.7a log
=================

CDswitch version: 0.6.5.3
Path to CDswitch: D:\Andere OEM dingen\cdswitch\cdswitch.exe
Resolution: 1280x800x32x60
OS: WIN_XP Service Pack 2 build 2600
Working directory: D:\Andere OEM dingen\AutoIT\cdswitch
User: Nanaki

Date: 25/05/2005
Time: 20:45.12

Your supplied parameters: m00 1 /r:notepad /w /l:C:\cdswitch.txt
Number of parameters detected: 5

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

3. Parameter "/r" detected. Used to launch applications. Errors will be detected when needed.

4. Parameter "/w" detected. Used to let CDswitch wait when launching applications.

5. Parameter "/l" detected. Used to create this log.
The log will be saved at "C:\cdswitch.txt".

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

Detected drives:
1. f:

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

That's it for today. ^^

Edited by Nanaki

Share this post


Link to post
Share on other sites
Nanaki    0

<span style='font-size:9pt;line-height:100%'>

0.7b (28-05):

- Renamed "/l" to "/k"

- Added "/f" parameter to detect drives by label

</span>

<span style='font-size:9pt;line-height:100%'>

Help (28/05/2005):

- Updated for 0.7b

- Finished "Logging"

- Finished "Detecting drive by label"

</span>

<span style='font-size:12pt;line-height:100%'>

Download CDswitch 0.7b here (181k).</span>

<span style='font-size:12pt;line-height:100%'>

Download CDswitch 0.7b with helpfile here (691k).</span>

Well, logging parameter changed to avoid confusion with label edits.

Next, I'll just copy-paste from helpfile. :P

This is accomplished by using "/f:" in the second parameter. Say, you have two discs, one for Windows-installation and the other for applications. The first disc is called "WHXXPP_NL1", the second "WHXXPP_NL2". You can now detect the drive containing that first disc, and then eject it, with the question to insert the second disc in that drive:

cdswitch WHXXPP_NL2 /f:WHXXPP_NL1

When the disclabel is something like "WHXPP NL1", thus with spaced in, use quotations:

cdswitch WHXXPP_NL2 /f:"WHXXPP L1"

meh

Edited by Nanaki

Share this post


Link to post
Share on other sites
Nanaki    0

:) I don't think a cd-switching app qualifies to be up there, hehe. :)

Now, one of the things I'm trying to do in 0.7 is making it easier. Altho I created a help-file, I don't think people, especially newbs, like to read, especially not for a small utility like this. :P So I came up with something new, a sort of "parameter creator", and I started working on it the last half hour. This is the result:

*[image removed]*

As I said, it's created under a half an hour, so several things are still broken. One thing is that always quotations are used, so it might interfere with RunOnceEx. A second thing is that the "?"-buttons don't work yet. A third and last thing I didn't feel like testing it. :D

One last remark, some functions inside the app are only for CDswitch 0.7b.

Edited by Nanaki

Share this post


Link to post
Share on other sites
Nanaki    0

@ badboy05mtl: know to tell if you have any bugs. =p

@ totoymola: lol, tnx :)

Anyway, time for one of the last posts in this topic. The final version of 0.7 will have a name-change and a more clear topic. I'm afraid the current first post is scaring a lot of ppl off. :P

<span style='font-size:9pt;line-height:100%'>

0.7b2 (05-06):

- Fixed a bug where logging interfered with the "too few" parameters check

- Removed (useless) logging code for Silent Mode and Variable actions

- Silent mode uses much less memory now

- Silent mode can now also use "/f" to detect a label

- Made "/f"-parameter case sensitive

- Improved the disc checking mechanism

- When the size of a supplied image can't be retrieved, CDswitch will exit

- When the image can not be loaded, CDswitch will exit (this action will also be logged)

- Some updates

</span>

<span style='font-size:12pt;line-height:100%'>

Download CDswitch 0.7b2 here (181 kB).</span>

Edited by Nanaki

Share this post


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.

×