Nanaki Posted April 5, 2005 Author Posted April 5, 2005 (edited) <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: /dI do suggest not using it when not needed, it slows down the app two seconds. 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 September 19, 2007 by Nanaki
aussiecanuck46 Posted April 6, 2005 Posted April 6, 2005 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" /fREG ADD %KEY%\060 /V 1 /D "cdswitch.exe Office_XP %CDROM% /d" /fREG ADD %KEY%\060 /V 2 /D "%CDROM%\setup.exe TRANSFORMS=Office.MST /qb-" /fThis 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" /fI then switch back to my regular Unattended XP installation CD withREG ADD %KEY%\060 /V 4 /D "cdswitch.exe WXPPFP_EN %CDROM% /d" /fand 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.
Nanaki Posted April 6, 2005 Author Posted April 6, 2005 Ah crap, I forgot the change the example.The switch is "/r", not /a cdswitch OFFICE d /r:"%CDROM%\SETUP.EXE TRANSFORMS=Office.MST /qb-" /dBut 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
aussiecanuck46 Posted April 7, 2005 Posted April 7, 2005 Ah crap, I forgot the change the example.The devil is in the details Thanks again.
Nanaki Posted April 8, 2005 Author Posted April 8, 2005 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.
totoymola Posted April 8, 2005 Posted April 8, 2005 I have a suggestion. Don't you think it's better to have a complete help file along with the tool?
Nanaki Posted April 8, 2005 Author Posted April 8, 2005 I was thinking about a complete package in the future. But for now I would like to keep it simple.
Nanaki Posted April 9, 2005 Author Posted April 9, 2005 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, But I reconned people don't want to install runtimes first.
Nanaki Posted April 10, 2005 Author Posted April 10, 2005 (edited) 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. <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" /fREG ADD %KEY%30 /V 1 /D "%systemdrive%\install\Setup.exe -s" /fREG ADD %KEY%35 /VE /D "Office 2003" /fREG ADD %KEY%35 /V 1 /D "cdswitch OFFICE_2003 %CDROM% /r:"%CDROM%\SETUP.EXE TRANSFORM=Unattended.MST /QB-" /w" /fREG ADD %KEY%40 /VE /D "Shutdown and reboot, or insert next disc, or switch back" /fREG ADD %KEY%40 /V 1 /D "blah!" /fAlso, 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.jpgFinally, silent mode can use the "variations" to disc-supplying:So instead of "cdswitch /s /o d:" you can now use:cdswitch /s /o dor when you want to eject the first drive:cdswitch /s /o 1Same applies for the "/s /c"mode.<span style='font-size:12pt;line-height:100%'>You can download CDswitch 0.6a here (179k).</span> Edited September 19, 2007 by Nanaki
Nanaki Posted April 10, 2005 Author Posted April 10, 2005 (edited) <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 /ewThis 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 offecho %CD1%echo %CD2%will output this:d:e:Jay! To delete those variables again:cdswitch /edAnd then there's "/eg", I'll explain that another time. <span style='font-size:12pt;line-height:100%'>You can download CDswitch 0.6b here (179k).</span> Edited September 19, 2007 by Nanaki
totoymola Posted April 10, 2005 Posted April 10, 2005 Dude you're really working on this. It's getting better everyday. Thanks.
aussiecanuck46 Posted April 13, 2005 Posted April 13, 2005 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?
Nanaki Posted April 13, 2005 Author Posted April 13, 2005 @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.htmRead 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now