MSFN Forum: A New Cd-switching Utility - MSFN Forum

Jump to content



  • 11 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

A New Cd-switching Utility ... if anyone cares Rate Topic: ***** 1 Votes

#41 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 10 April 2005 - 08:56 AM

First thing's first: don't use v0.5. It contains a bug which breaks some parameters (autorun and application). I've compiled a new version with just the fix of this bug. It's available in the first post.

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

Quote

0.5rv1 (10-04):
- Fixed critical bug which disabled some parameters
</span>

Please update to THAT version, as 0.5 well... sucks. :P

<span style='font-size:12pt;line-height:100%'>
You can download CDswitch 0.5rv1 here (180k).</span>


Next, 0.6a is done:

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

Quote

0.6a (10-04):
- Fixed critical bug which disabled some parameters
- Improved disc-checking mechanism, this enables the silent mode to use simplified methods
- When Escape is pressed, "/r" will now be ignored
- Added "/w" parameter to keep cdswitch open when "/r" is run
- Some improvements of the use of the base image
- Improvements of the navigation with the "/p" parameter
- Improvements in interpreting Windows-variables
- When a disc with incorrect case was inserted, the drive would not eject. cdswitch label detection is now fully case sensitive.
- Slashed size a weeee bit
- More error repression. When the "/r"-app could not be launched an error tells you so.
</span>

Well, this release is a huge step forward in stability. Featurewise it also has some new stuff.

First, the "/r" parameter can now be extended with the "/w" parameter. When both are used, cdswitch will wait (hidden) on the launched app to finish. This is useful for single-app discs.
Say, you have Office on only one disc. You now only need one entry anymore (I'll give a quick RunOnceEx example):

REG ADD %KEY%30 /VE /D "Application whatever" /f
REG ADD %KEY%30 /V 1 /D "%systemdrive%\install\Setup.exe -s" /f

REG ADD %KEY%35 /VE /D "Office 2003" /f
REG ADD %KEY%35 /V 1 /D "cdswitch OFFICE_2003 %CDROM% /r:"%CDROM%\SETUP.EXE TRANSFORM=Unattended.MST /QB-" /w" /f

REG ADD %KEY%40 /VE /D "Shutdown and reboot, or insert next disc, or switch back" /f
REG ADD %KEY%40 /V 1 /D "blah!" /f


Also, you can navigate with the "/p", this has now been improved. If your picture is one dir back, you can navigate to it:

cdswitch blah! d: /p:..\groovy.jpg


Finally, silent mode can use the "variations" to disc-supplying:

So instead of "cdswitch /s /o d:" you can now use:

cdswitch /s /o d


or when you want to eject the first drive:

cdswitch /s /o 1


Same applies for the "/s /c"mode.
<span style='font-size:12pt;line-height:100%'>
You can download CDswitch 0.6a here (179k).</span>

This post has been edited by Nanaki: 19 September 2007 - 08:30 AM



#42 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 10 April 2005 - 11:44 AM

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

Quote

0.6b (10-04):
- Added "/ew" to write all drive letters to variables
- Added "/ed" to delete those again
- Added "/eg" to set errorlevel. 1=A, 2=B, ...
</span>

Alright, a totally new feature today. :)

First, "/ew", use it like this:

cdswitch /ew


This will write ALL CD/DVD-drivelettres to its own variable. For instance, if you have "d:" and "e:", those will be written under "CD1" and "CD2". So this batchcode:

@echo off
echo %CD1%
echo %CD2%


will output this:

d:
e:


Jay! To delete those variables again:

cdswitch /ed


And then there's "/eg", I'll explain that another time. :P

<span style='font-size:12pt;line-height:100%'>
You can download CDswitch 0.6b here (179k).</span>

This post has been edited by Nanaki: 19 September 2007 - 08:31 AM


#43 User is offline   totoymola 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 944
  • Joined: 24-September 04

Posted 10 April 2005 - 02:54 PM

Dude you're really working on this. It's getting better everyday. Thanks. :D

#44 User is offline   aussiecanuck46 

  • Junior
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 14-May 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 13 April 2005 - 08:19 AM

I'm unable to get the /r: parameter to work if there are options and switches to be supplied to the install program. Even with the install string enclosed within double quotes, as you show in your example above, it doesn't work.

I can see that the entires aren't being properly inserted into the RunOnceEx registry key, which tells me that there's a syntax error that the registry editor doesn't like. I can correct this by removing the double quotes around
/r:"%CDROM%\setup.exe TRANSFORMS=Office.MST /qn"
But then cdswitch doesn't recognize the options and switches that are required by the installation program.

I was able to get the installation working by using separate lines within RunOnceEx.cmd to initiate cdswitch, then run the installation, then revert back to the original CD. Is there something still not right with the /r: option, or am I doing something wrong?

#45 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 13 April 2005 - 09:03 AM

@totoymola: thanks :)

@aussiecanuck46: Well, before I take a look at it, I must now it's really CDswitch's fault.

Are you using the "/w" parameter added in 0.6? This parameter was added for your purpose. Without it, CDswitch will NOT wait until the launched application with "/r" is done. This means that RunOnceEx will continue while Office install isn't finished.

EDIT= Crap, I've misread your post.
http://unattended.msfn.org/intermediate/me...s/runonceex.htm
Read the "Applications that use quotations" section. Hmm, I'm gonna add this to the help file. :)

@noone in particular: v0.6 final is done:

Quote

0.6 (13-04):
- Added per-user "/u" parameter to all environment-parameters
- Improved environment-parameters
- Rewritten "/eg" parameter.


I didn't really spent much attention to this release, that's why the explanation of the new stuff (in the first post) is pretty vague. 0.7 will be focused on making the program more easy-of-use. It'll probably contain a help-file too.

#46 User is offline   Kelder 

  • Group: Members
  • Posts: 5
  • Joined: 02-March 05

Posted 14 April 2005 - 10:40 AM

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.

#47 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 14 April 2005 - 01:10 PM

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

This post has been edited by Nanaki: 19 September 2007 - 08:34 AM


#48 User is offline   aussiecanuck46 

  • Junior
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 14-May 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 14 April 2005 - 02:00 PM

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

#49 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 14 April 2005 - 03:30 PM

aussiecanuck46, on Apr 15 2005, 01:30 AM, said:

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:

#50 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 17 April 2005 - 12:56 PM

The rewritten helpfile for 0.7 can be found here.

Looks like the "/eg"-parameter doesn't work but meh, I'll fix that another time. >_>

This post has been edited by Nanaki: 19 September 2007 - 08:34 AM


#51 User is offline   chengc 

  • Group: Members
  • Posts: 1
  • Joined: 05-August 03

Posted 26 April 2005 - 08:09 AM

Very useful tool. One issue for /r switch, if I use ALT+F4 close CD-Switching, it still launch defined application!

#52 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 26 April 2005 - 09:46 AM

Meh :P

I'll fix that in the next version, but for now just use ESC to exit. ;)

#53 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 02 May 2005 - 02:04 PM

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.

#54 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 25 May 2005 - 12:42 PM

chengc, on Apr 26 2005, 08:09 AM, said:

Very useful tool. One issue for /r switch, if I use ALT+F4 close CD-Switching, it still launch defined application!
<{POST_SNAPBACK}>


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%'>

Quote

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

This post has been edited by Nanaki: 19 September 2007 - 08:38 AM


#55 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 28 May 2005 - 04:46 AM

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

Quote

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%'>

Quote

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

This post has been edited by Nanaki: 19 September 2007 - 08:38 AM


#56 User is offline   dust 

  • Group: Members
  • Posts: 4
  • Joined: 15-May 05

Posted 28 May 2005 - 03:14 PM

Sticky? :)

#57 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 31 May 2005 - 10:49 AM

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

This post has been edited by Nanaki: 19 September 2007 - 08:39 AM


#58 User is offline   badboy05mtl 

  • Junior
  • Pip
  • Group: Members
  • Posts: 63
  • Joined: 20-December 04

Posted 31 May 2005 - 08:27 PM

cool I like but I didn't test yet.... I am going test until I finish all my program add to my unattended.

#59 User is offline   totoymola 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 944
  • Joined: 24-September 04

Posted 02 June 2005 - 02:31 PM

this is really cool. :)

#60 User is offline   Nanaki 

  • Leg-humper
  • PipPipPipPip
  • Group: Members
  • Posts: 511
  • Joined: 17-January 05

Posted 05 June 2005 - 11:15 AM

@ 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%'>

Quote

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>

This post has been edited by Nanaki: 19 September 2007 - 08:39 AM


Share this topic:


  • 11 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy