Nanaki Posted August 7, 2006 Author Share Posted August 7, 2006 1) Trycdswitch Disc_2 /g:Disc_1 /d /r:*DRIVE*\WPI\WPI.hta2) CDswitch.cmd is interesting, but I don't really know what's causing it. I couldn't reproduce too. What exactly do you mean with "recursing like maniac". Link to comment Share on other sites More sharing options...
kof94 Posted August 7, 2006 Share Posted August 7, 2006 (edited) 1) Shall give it ago! (didn't know you could do it already)2) I couldn't figure out what was happening so a removed all other commands from the cmd except executing CDSwitch.All I saw was something like this:...IF Exist Y:\CD.txt Set CDROM=Y:\IF Exist Z:\CD.txt Set CDROM=Z:\IF Exist D:\CD.txt Set CDROM=D:\IF Exist E:\CD.txt Set CDROM=E:\IF Exist F:\CD.txt Set CDROM=F:\IF Exist G:\CD.txt Set CDROM=G:\IF Exist H:\CD.txt Set CDROM=H:\...This isn't accurate but you get the picture!I'm not sure if recurse is the correct wording for this but it's a continuous process that never exits i.e. it never finds the drive.If I change the name of the .cmd or run the same command from run I get no problem, finds the drive instantly.It's not really a problem though, just strange . Edited August 7, 2006 by kof94 Link to comment Share on other sites More sharing options...
Nanaki Posted August 15, 2006 Author Share Posted August 15, 2006 If it doesn't find the drive, CDswitch exits. So maybe it's the batch-file doing naughty. I haven't got any time to look into it yet, since I'm out for a week over a couple of minutes. =) Link to comment Share on other sites More sharing options...
thern Posted October 20, 2006 Share Posted October 20, 2006 suggestions:hint. im working in cmd...1. when cdswitch /v /c /f:<file> in cmd window (first time) there is no variable in, but when i reload cmd it showsis it fixable?2. when cdswitch /v /c /f:<file> second time and installation cd/dvd is in other drive, in cmd sill is old variable, must reload cmdis it fixable?3. when cdswitch /v /d in cmd variable still exist (even if i reload cmd) is it fixable?4. is there (or will be) option to check if variable exist and it differes from new one, in cdswitch, eg.i've CDDRIVE=l: but i put cd/dvd disk to other drive and i want to be sure is CDDRIVE variable is correct, if not rewrite it or submit errorlevel5. (question), there are errorlevels, but echo %errorlevel% in cmd is still 0 is it fixable?btw. sorry for my bad english... Link to comment Share on other sites More sharing options...
pmshah Posted October 22, 2006 Share Posted October 22, 2006 I do it with a single line of codefor %%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:\win51ip.SP2 set CDROM=%%iYou can replace the file details to look for as per your requirements. Please note the missing ":" in the set command. Reversing the order of the alphabets would be a better option since the cd drive letter usually takes on a character after all the volumes are mapped. In this case there would be no errors in the event of finding a similarly named file in the root of a local volume.If you create your volumes after installing the OS it creates another problem, i.e. the volumes will be assigned letters following the cdrom which might turn out to be "d:". So what I usually do is assign the cdrom drive letter "W" from run_once file using diskpart. On a single cd drive systems this invariably is volume 0.I use a utility called wineject which takes on simple switch. The code is ...wineject -open wsleep 10 wineject -close wwineject & sleep.exe of course are external files & freeware. Link to comment Share on other sites More sharing options...
Nanaki Posted October 23, 2006 Author Share Posted October 23, 2006 suggestions:hint. im working in cmd...1. when cdswitch /v /c /f:<file> in cmd window (first time) there is no variable in, but when i reload cmd it showsis it fixable?2. when cdswitch /v /c /f:<file> second time and installation cd/dvd is in other drive, in cmd sill is old variable, must reload cmdis it fixable?3. when cdswitch /v /d in cmd variable still exist (even if i reload cmd) is it fixable?4. is there (or will be) option to check if variable exist and it differes from new one, in cdswitch, eg.i've CDDRIVE=l: but i put cd/dvd disk to other drive and i want to be sure is CDDRIVE variable is correct, if not rewrite it or submit errorlevel5. (question), there are errorlevels, but echo %errorlevel% in cmd is still 0 is it fixable?btw. sorry for my bad english...1, 2, 3. cmd loads the variables at the startup. When you "load" cmd, it "loads" the variables. Pretty much nothing I can do about it.4. Nope, there isn't, sorry. Maybe later, or a separate app, heh. 5. God, I once implemented it, but I have no idea what the state is on that. I should check that. I do it with a single line of codefor %%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:\win51ip.SP2 set CDROM=%%iYou can replace the file details to look for as per your requirements. Please note the missing ":" in the set command. Reversing the order of the alphabets would be a better option since the cd drive letter usually takes on a character after all the volumes are mapped. In this case there would be no errors in the event of finding a similarly named file in the root of a local volume.If you create your volumes after installing the OS it creates another problem, i.e. the volumes will be assigned letters following the cdrom which might turn out to be "d:". So what I usually do is assign the cdrom drive letter "W" from run_once file using diskpart. On a single cd drive systems this invariably is volume 0.I use a utility called wineject which takes on simple switch. The code is ...wineject -open wsleep 10 wineject -close wwineject & sleep.exe of course are external files & freeware.I do recommend thern to use the "for... blah blah" to detect the drive (although I think WPI has a separate method to detect the drives?) but I don't really see what you're doing afterwards. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted October 24, 2006 Share Posted October 24, 2006 Hey Nanaki if you can get this thread moved over to the WPI forum I will re-sticify it for you. Link to comment Share on other sites More sharing options...
Nanaki Posted October 24, 2006 Author Share Posted October 24, 2006 Heh, that's nice, but it's not really related to WPI. (Well, aside from the fact that most people using this app are WPI-users. ) Link to comment Share on other sites More sharing options...
rajesh.kumar Posted October 25, 2006 Share Posted October 25, 2006 my wishes nanaki. glad to be in touch with u after long time. ur program works great all times but in WPI, if i use cdswitch.exe to check for cd which is already there in the drive, WPI gives me debug error and WPI gets hanged and i have to use ctrl+alt+del to kill it. Also the cdswitch.exe "request" screen itself is not showing. i wanted to know is there any way for cdswitch to simply exit and returns to WPI normally, if the required cd is already in the drive. i remember that when cdswitch is executed directly in my cmd files, it didnt give me problem like this, but im not sure. Link to comment Share on other sites More sharing options...
Nanaki Posted October 25, 2006 Author Share Posted October 25, 2006 When the correct disc is inserted, it should normally exit right away.Are you using 0.8.4 or 0.9a? Link to comment Share on other sites More sharing options...
rajesh.kumar Posted October 25, 2006 Share Posted October 25, 2006 (edited) the one which came with WPI5.5. the problem comes when installing office2003, ie installing word, excel, pp,access individually from wpi. i mean by selecting each one from wpi and not just the whole office CD. so what it does is install word first and then checks for cd label and then installs excel etc. so before installing each component, it checks for cd label. since its the same office2003 cd from which selected compnents has to be installed, the installation must go on. but what happens is after installing word, wpi shows debug error. the next line to be executed is cdswitch, before installing the next selected office component(excel or access or pp). just now i tested with other apps in WPI by inserting cdswitch command in them. it works well. so i found out there is not prob with cdswitch. may be with installation of office files. sorry for the inconvinence. i posted that coz i was trying various ways for past one day, but was testing using office portion. thanks very much.Just now i found that it was due to the fact that office cd was present instead of WPI cd. Everytime WPI finishes installating a software, it is looking for installer.hta in WPI cd. so i just used cdswitch.exe after each software installation if that software is present in other than WPI cd. Edited October 26, 2006 by rajesh.kumar Link to comment Share on other sites More sharing options...
pmshah Posted October 26, 2006 Share Posted October 26, 2006 suggestions:hint. im working in cmd...1. when cdswitch /v /c /f:<file> in cmd window (first time) there is no variable in, but when i reload cmd it showsis it fixable?2. when cdswitch /v /c /f:<file> second time and installation cd/dvd is in other drive, in cmd sill is old variable, must reload cmdis it fixable?3. when cdswitch /v /d in cmd variable still exist (even if i reload cmd) is it fixable?4. is there (or will be) option to check if variable exist and it differes from new one, in cdswitch, eg.i've CDDRIVE=l: but i put cd/dvd disk to other drive and i want to be sure is CDDRIVE variable is correct, if not rewrite it or submit errorlevel5. (question), there are errorlevels, but echo %errorlevel% in cmd is still 0 is it fixable?btw. sorry for my bad english...1, 2, 3. cmd loads the variables at the startup. When you "load" cmd, it "loads" the variables. Pretty much nothing I can do about it.4. Nope, there isn't, sorry. Maybe later, or a separate app, heh. 5. God, I once implemented it, but I have no idea what the state is on that. I should check that. I do it with a single line of codefor %%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:\win51ip.SP2 set CDROM=%%iYou can replace the file details to look for as per your requirements. Please note the missing ":" in the set command. Reversing the order of the alphabets would be a better option since the cd drive letter usually takes on a character after all the volumes are mapped. In this case there would be no errors in the event of finding a similarly named file in the root of a local volume.If you create your volumes after installing the OS it creates another problem, i.e. the volumes will be assigned letters following the cdrom which might turn out to be "d:". So what I usually do is assign the cdrom drive letter "W" from run_once file using diskpart. On a single cd drive systems this invariably is volume 0.I use a utility called wineject which takes on simple switch. The code is ...wineject -open wsleep 10 wineject -close wwineject & sleep.exe of course are external files & freeware.I do recommend thern to use the "for... blah blah" to detect the drive (although I think WPI has a separate method to detect the drives?) but I don't really see what you're doing afterwards. I am a 200 mb CD freak. I have broken up my full fledged windows installation in 3 parts.The 1st cd is a multiboot cd which includes boot options that permit partitioning, formatting & installation of th main OS. On the same cd I have a minibrowser which has references to the following 2 CDs. One containing Applications & the oither a good selection of utilities. When the user clicks on his selection, the routine copies a number of cmd files & winejcet to the root of %systemdrive%, starts one of the cmd files in another shell & exits. The variable %cdrom% does not exist in the new shell so the cmd file runs the find CD routine & "wineject"s the CD tray & after a predefined delay retracts the tray. It looks for the specific file file on the CD the user may have selected. If the file is not found it displays a message & ejects the CD once again, looping until the user either terminates the process or inserts the correct CD, at which point the cmd file will erase the files which were originally copied to the systemroot & del itself. The Correct CD will then autorun.One can also leave the option of checking for the cd rom & simply end the process, leaving the PC itself to take care of the autorun for that CD. Link to comment Share on other sites More sharing options...
Nanaki Posted October 26, 2006 Author Share Posted October 26, 2006 @rajesh.kumar: good to hear @pmshah: what's the difference with CDswitch, =) Link to comment Share on other sites More sharing options...
tcarman Posted December 6, 2006 Share Posted December 6, 2006 Is there anyway of using this if the CD happens to have no label?? Link to comment Share on other sites More sharing options...
Nanaki Posted December 6, 2006 Author Share Posted December 6, 2006 I have no idea. Try doing something likecdswitch "" D:and know to tell me if it works. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now