Jump to content

A New Cd-switching Utility


Recommended Posts

I've got a problem maybe nanaki can help me. Well works perfect but I'm creating a unanttended windows in 2 cds and I'm using cdswith for the switch but when I insert the second cd shows the desktop and I dont want that. I want to launch WPI but the desktop should not be show it.

This this the line I'm using

cmdow @ /HID

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:

start /wait cdswitch COLOSSUS2AP %CDROM% /r:%CDROM%\wpi.cmd /p:%CDROM%\pic.jpg /ll:50 /lt:15
ECHO.
EXIT

this is my wpi.cmd

@ECHO OFF
REM
REM WPI startup something.
REM

REM Example, how to look for CDROM-drive. Must have a file called WIN51 in its root.
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\WIN51 set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

REM Determine the WPI startup path.
REM If WPI should run off the CD the replace %dp0 with %CDROM%\PathToWPI
set WPIPATH=%CDROM%\Install\wpi
echo WPI will run from %WPIPATH%

REM Hide this command window
start %SystemRoot%\system32\cmdow.exe @ /HID

REM Make WPI driectory the current directory
for /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO echo %%i:
cd "%WPIPATH%"

REM inicia WPI
start /wait WPI.hta

REM Limpia el escritorio
del /S /Q "%userprofile%\Escritorio\*.lnk"
del /S /Q "%AllUsersProfile%\Escritorio\*.lnk"

REM Limpia el inicio
regedit /s %systemdrive%\Windows\Temp\remove.reg

REM Reinicia el sistema
start /wait %Windir%\Temp\RESTART.exe

exit

:end

Edited by DryKillLogic
Link to comment
Share on other sites


...

If I understand correctly, try this:

cmdow @ /HID

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:

start /wait cdswitch COLOSSUS2AP %CDROM% /r:%CDROM%\wpi.cmd /p:%CDROM%\pic.jpg /ll:50 /lt:15 /rw
ECHO.
EXIT

Its good that it searches only optical drives. :)

Now, if only someone could test it with BD and HDDVD. =)

Link to comment
Share on other sites

Theoretically should work on hd-dvd & BD too. Since it works with vmware devices & real cd/dvd drives & daemon/scsi cd drives....

DryKillLogic, i dont see why you'd use the IFEXIST method, AND the cdswitch method, to set the CDROM variable? One of those should do the job?

Link to comment
Share on other sites

nanaki: It doesnt work :(

prathapml: mmm... I dont know it's the only way to find for get it. I will try to explain you. In the first cd I've windows + drivers the second one has the appz but the problem is the next, when I insert the second cd open wpi but the desktop appear and it should not happen that. do you know another way to get it?

Link to comment
Share on other sites

Alright, here's the deal: I don't really have time to look into this, with exams 'n everything. So I can only offer you a workaround that might not work (since I don't know the exact problem anyway). Until my precious time returns.

Anyway, I think CDswitch is having some trouble running DOS-command scripts under certain situations, and those seem to exit too soon (well, windows is having trouble with it, but meh).

I presume you run everything with GUIRunOnce, right? Well, at this time, run a super-duper-batchfile that takes care of the others;

[GuiRunOnce]
%systemdrive%\install\batch_file.cmd

CMDOW @ /HID

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:

start /wait %CDROM%\stuffthatshouldinstallfromdiscone.cmd

start /wait cdswitch COLOSSUS2AP %CDROM% /p:%CDROM%\pic.jpg /ll:50 /lt:15

start /wait %CDROM%\wpi.cmd

That's how I installed back in the days I still made unattended installations, sort of.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for ur effort

I'm using the ur command with WPI and working perfect

but I need help for two method

1- I got error in Cd Switch Log file using parameter /p:WPI.jpg

Parameter "/p" detected. Used to specify a custom image file.
ERROR: Supplied file "WPI.jpg" not found! Please check your parameters.

where can I put my Custom pic ???????

2- I need to install more than One Programs from additional CD , and by the three command above make WPI asking for other cd in each program installing

is there any help

thanks again

Link to comment
Share on other sites

1 - Is WPI.jpg in the same folder as CDswitch.exe?

2 - I'm not sure what you're asking here. You can save a separate batch file or whatever per cd.

First : Yes the WPI.jpg on the same CDswitch Directory or folder as u asked

Second : sorry for that . I Mean this command

COMMAND 1: CDSWITCH OFF2003 %CDROM% /d /p:WPI.jpg /lc:FFFFFF /ls:12 /lf:"Times New Roman" /lw:400 /ll:49 /lt:13
COMMAND 2: %CDROM%\office\setup.exe TRANSFORMS=%SYSTEMDRIVE%\Install\Unattended.MST /qb-
COMMAND 3: CDSWITCH VRMPVOL_EN %CDROM% /d /p:WPI.jpg /lc:FFFFFF /ls:12 /lf:"Times New Roman" /lw:400 /ll:49 /lt:13

and I need to make other CD with Office and some Programs

but if I use the Command above it will ask for the each Programs Install

is there any help for that ????????

Link to comment
Share on other sites

1. Make sure cdswitch.exe and WPI.jpg are on the hard drive, not on a CD.

If so, try placing the attachment (cdswitch.ini) in the same folder as cdswitch.exe and removing "/p:WPI.jpg" from your parameters.

If that doesn't work, try resaving WPI.jpg as a bitmap (WPI.bmp) and see if that works.

If all that doesn't work or you don't want to do those, just send me the picture you're trying to display.

2. So after inserting a new disc, WPI asks what programs to install? It might be better to ask for help on the WPI-forum for this one, since I never used WPI before. Sorry. :/

cdswitch.ini

Link to comment
Share on other sites

  • 4 weeks later...

thanks

but I have one more Q

how can I use CDSwitch in Runonce

I've got Idea is to make cdswitch run after windows installation is completed and ask for second cd contain WPI with autorun

what is the command to enter in nLite RunOnce ????????

many thanks for help

Link to comment
Share on other sites

  • 2 months later...

:hello:

I execute CDSwitch early in a RunOnceEx install. I prepare multiCD install and whole RunOnceEx takes data from the next CD.

And CDSWICH is in the first called subkey :) :

cmdow @ /HID 
@Echo Off

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:win51ip.SP2 SET CDROM=%%i:
SET KEY=HKLMSOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx

REG ADD %KEY% /V TITLE /D "Installing applications ..." /f
REG ADD %KEY% /V FLAGS /D "dword:0x00000020" /f

REG ADD %KEY /VE /D "Change the CD" /f
REG ADD %KEY /V 1 /D "%SYSTEMDRIVE%CDSWITCH.EXE XP_AddOns %CDROM% /p:%SYSTEMDRIVE%CDSWITCHBACK.BMP /lh" /f


But versions .84 and .86 doesn't shows the picture :} . An empty rectangle is shown. Filled with color like buttonface.

Seems that version .85b shows the picture properly :wacko: .

Regards

Link to comment
Share on other sites

Yep, a known issue. Windows is incorrectly painting CDswitch on screen, due to it being loaded all early and stuff. CDswitch 0.8.5b contains a fix for this (I really should consolidate the versions, maybe some time later), but I haven't incorporated this change into later versions yet, because it makes CDswitch "blink". I'll probably add a parameter "--repaint" or something like that soon.

Link to comment
Share on other sites

:hello:

Yep, a known issue. [...]

What method are You using to show the picture? And, which is much more interesting for me, why? Means "what is Your experience with that?".

At stage when I don't know about the existence of version 0.8.5.b (I was thinking that Your excelent help is enough for me and I didn't read this hread - me culpa, mea culpa, mea maxima culpa :)), I wrote (in Borland Delphi) simple (foolish?) application to show an bitmap. It shows an bitmap from file, which name is passed in the first parameter of command line, calls external application (from the second parameter) passing to them the rest of parameters and waits to the end of the execution of the called application. I was using that so:

REG ADD %KEY /V 1 /D "%SYSTEMDRIVE%\SHOWBMP.EXE %SYSTEMDRIVE%\MYBMP.BMP %SYSTEMDRIVE%\CDSWITCH.EXE XP_AddOns %CDROM% /p:%SYSTEMDRIVE%\CDSWITCHBACK.BMP /b /lh /k" /f

where CDSWITCHBACK.BMP was small bitmap (1 pixel in size).

It was artifical (but working for me) solution.

But You are using other method then me. What method and why?

Regards

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