Nanaki

A New Cd-switching Utility

217 posts in this topic

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

0.5a (26-03):

- Made file size smaller again

- Added "/lw" parameter. Use it to specify label font weight.

0.5b (05-04):

- Added "/a" parameter. Use it to launch a specified application AFTER the correct disc is inserted.

0.5b2 (05-04):

- Changed "/a" parameter to "/r"

- Added experimental AutoRun suppression with "/d" parameter

- The 0.0000001% chance of the tray ejecting while the correct disc was inserted is gone.

</span>

Well, I decided to update the old code a bit, as I can't get rid out of a crappy bug in the bug. Anyway, you can now use code like this:

cdswitch blabla f: /r:%CDROM%\Apps\batch.cmd"

It'll launch %CDROM%\Apps\batch.cmd when the correct disc is inserted.

About AutoRun, use this code to suppress it:

cdswitch blabla f: /d

I do suggest not using it when not needed, it slows down the app two seconds. :P It's also experimental, I can't promise anything. :)

<span style='font-size:14pt;line-height:100%'>Download CDswitch 0.5b2 here (179k)</span>

Edited by Nanaki
0

Share this post


Link to post
Share on other sites

FYI - I'm using RunOnceEx, not GuiRunOnce.

The /d switch to disable autorun seems to work quite well. However I've had trouble using it with /a: . While installing Office XP I cannot get the TRANSFORMS= and /qb- parameters executed properly within a batch file. No matter where I put double-quotes the best I can seem to do is run setup.exe without operands.

I've resorted to inserting cdswitch.exe into a REG ADD %KEY% statement as follows:

REG ADD %KEY%\060 /VE /D "Microsoft Office XP SP3" /f
REG ADD %KEY%\060 /V 1 /D "cdswitch.exe Office_XP %CDROM% /d" /f
REG ADD %KEY%\060 /V 2 /D "%CDROM%\setup.exe TRANSFORMS=Office.MST /qb-" /f

This seems to work. (NOTE that Office.MST is the renamed Unattended.MST, suggested by someone that 8.3 might be a problem. I'm not sure it is.)

I then need to apply the KB885884 patch. I do this by adding into my RunOnceEx.cmd file:

REG ADD %KEY%\060 /V 3 /D "%CDROM%\Q885884.exe /q /o /n /z" /f

I then switch back to my regular Unattended XP installation CD with

REG ADD %KEY%\060 /V 4 /D "cdswitch.exe WXPPFP_EN %CDROM% /d" /f

and all is well from there.

It's a lot simpler than the post I submitted a couple of days ago. There's no batch file to create or execute.

Thank you to Nanaki, AaronXP, gosh, and the others for giving me the tools and clues to figure this one out.

0

Share this post


Link to post
Share on other sites

Ah crap, I forgot the change the example.

The switch is "/r", not /a :D

cdswitch OFFICE d /r:"%CDROM%\SETUP.EXE TRANSFORMS=Office.MST /qb-" /d

But anyway, I recommend not using it in your situation. If you use the code above, your RunOnceEx will detect cdswitch exiting, and continue, but in the meanwhile Office setup has started. You can always use a batchfile or RunOnceEx on the disc itself though, then "/r" would be useful.

And glad to hear the autorun-issue is solved :)

0

Share this post


Link to post
Share on other sites
Ah crap, I forgot the change the example.

The devil is in the details ;)

Thanks again.

0

Share this post


Link to post
Share on other sites

0.5 (08-04):

- Updated some code

- Improved "/r" parameter. When the correct disk is already inserted, "/r" now works.

- You can now define a number in the tray-area. Example, "use drive 1".

- Improved the spawning of the window (can't believe I didn't do this already)

Well, I've updated the documentation (aka "the first post") again. :)

0

Share this post


Link to post
Share on other sites

I have a suggestion. Don't you think it's better to have a complete help file along with the tool?

:)

0

Share this post


Link to post
Share on other sites

I was thinking about a complete package in the future. :)

But for now I would like to keep it simple. ;)

0

Share this post


Link to post
Share on other sites

Yup, I normally said that in my first post, looks like I've removed it when I updated it.

Hey, it's AutoIt or .NET, :P

But I reconned people don't want to install runtimes first. ;)

0

Share this post


Link to post
Share on other sites

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

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

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>

Edited by Nanaki
0

Share this post


Link to post
Share on other sites

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

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>

Edited by Nanaki
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

@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:

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.

0

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.