kurt476 Posted November 9, 2004 Share Posted November 9, 2004 i can't seem to get this command to work on the dos script.cmd or on run this command below: %cdrom% dose any budy know why i can't get this cmmand to work? Link to comment Share on other sites More sharing options...
Denney Posted November 9, 2004 Share Posted November 9, 2004 %CDROM% is NOT an enviroment variable. You need to figure out a way to find the CDROM drive letter and assign it to that variable.Take a look around here as there are some more posts (in the unattended forum I think) that explain how to set and use a %CDROM% variable.Again, the %CDROM% variable is NOT a default environment variable. Link to comment Share on other sites More sharing options...
kurt476 Posted November 9, 2004 Author Share Posted November 9, 2004 i don't see any thing that so i can use %cdrom% can some1 explain to me how i can use this command so i can run things from cd rom? but each drive for the cd rom is differnet. Link to comment Share on other sites More sharing options...
kurt476 Posted November 9, 2004 Author Share Posted November 9, 2004 hi me again yeah i didn't find any thing about this %cdrom% command i didn't find what i was looking for! Link to comment Share on other sites More sharing options...
Astalavista Posted November 9, 2004 Share Posted November 9, 2004 my GOD... did u even try to do a search?anyways here u pls use the search featurehttp://unattended.msfn.org/xp/runonceex_cd.htm Link to comment Share on other sites More sharing options...
kurt476 Posted November 9, 2004 Author Share Posted November 9, 2004 yes i did i put in cdrom foud nothing and put in %cdrom% found nothing again didn't find any thing on this commaind i just want to runn a command like this start /wait %cdrom%\application\appiilcation.exe /silent and i am just going to have a screen to click on so it automanicly installs when i click on it that all i want to do Link to comment Share on other sites More sharing options...
Alanoll Posted November 9, 2004 Share Posted November 9, 2004 you HAVE to declare the CDROM variable to do something like that.Unless you use a program like Autoplay Menu Studio which has built in support.you HAVE to declare it SOMEWHERE. Link to comment Share on other sites More sharing options...
kurt476 Posted November 9, 2004 Author Share Posted November 9, 2004 yeah of cours i just don't know how to have this command how to find the d: drive or e: or something like that i need to find the cd-rom Link to comment Share on other sites More sharing options...
Tsunami Posted November 9, 2004 Share Posted November 9, 2004 Well, you would know if you just read that website...In order to find the correct CD drive letter, we need to include some IF EXIST statements in the RunOnceEx.cmd file. Open RunOnceEx.cmd in Notepad, and include the following after @echo off: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:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:Create a blank txt file called CD.txt and place this in C:\XPCD. This allows the IF EXIST command to scan all the drive letters specified, then when it finds CD.txt it will set an environment variable of %CDROM% pointing to the correct drive letter. Link to comment Share on other sites More sharing options...
1chaoticadult Posted November 9, 2004 Share Posted November 9, 2004 You don't have to necessarily use CD.txt, I use WIN51IP.SP2 which works just like CD.txt doesn't. Link to comment Share on other sites More sharing options...
kurt476 Posted November 9, 2004 Author Share Posted November 9, 2004 well drthawhizkid can show me how that works? Link to comment Share on other sites More sharing options...
Alanoll Posted November 9, 2004 Share Posted November 9, 2004 @kurt476STOP!READ!he simply replaced CD.TXT in what Tsunami QUOTED with WIN51IP.SP2 as THAT file is already in the CDROOT of an XP CD. THE FILE YOU SPECIFY CAN BE ANYTHING!!! EVEN AUTORUN.INF IF YOU'RE SO INCLINED.Thread Closed. Link to comment Share on other sites More sharing options...
Recommended Posts