JayDogg Posted July 12, 2008 Share Posted July 12, 2008 (edited) Ok I have made a Windows XP self install disk, I would like to put a short cut or way to access a folder (Extras) on my install disk on the desktop.The source of the folder is "cdrom\I386\Extras", Now the first thing I tried was I put a short cut to "D:\I386\Extras" in the $OEM$ which worked just fine till I installed my disk on a computer that that a few hard drives in it. The D:\ was given to the slave drive then making the short cut on the desktop not work. Is there a system variable for the cdrom ? if so I could make a batch script name Extras on the desktop that would open the folder on the diskThe batch script would look something like this start "cdrom variable\I386\Extras"now if there is not a cdrom variable anyone elsse got a good idea on how to do this? Edited July 12, 2008 by JayDogg Link to comment Share on other sites More sharing options...
CoffeeFiend Posted July 12, 2008 Share Posted July 12, 2008 See this. Don't wanna sound rude, but this specific question has been asked at least a million times... Link to comment Share on other sites More sharing options...
JayDogg Posted July 12, 2008 Author Share Posted July 12, 2008 I did see that already but I dont understand it really, from what I have read in that thread if you put SET CDROM=%CD:~0,2% in CMDLINES.TXT which is in my $OEM$it will make the CDROM letter be F:\Is that right?And if it is how would I name the CDROM Z? and my CMDLINES.TXT looks like this[Commands]"rundll32 advpack.dll,LaunchINFSection nLite.inf,U"now how would I add the SET CDROM=%CD:~0,2% into thatwould it be [Commands]"rundll32 advpack.dll,LaunchINFSection nLite.inf,U""SET CDROM=%CD:~0,2%"or would it be [Commands]"rundll32 advpack.dll,LaunchINFSection nLite.inf,U SET CDROM=%CD:~0,2%" Link to comment Share on other sites More sharing options...
CoffeeFiend Posted July 12, 2008 Share Posted July 12, 2008 The post I linked to didn't say that at all. It said:There is a much simpler way. Have a unique file on your CD, and look for it:@echo offfor %%a 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 %%a:\path\to\yourfile.xyz set CDROM=%%a(where \path\to\yourfile.xyz is the path to your uniquely named file called yourfile.xyz or whatever it might be, with no drive letter of course)I use GUIRunOnce to start command.cmd, after that, command.cmd uses that code to find the CD Rom drive letter, and starts %CDROM\whatever.cmd that does the installs directly from the CD (Actually, a DVD-R but that's besides the point). Simple to do and works reliably at every stage.It doesn't get any easier than this... Link to comment Share on other sites More sharing options...
JayDogg Posted July 12, 2008 Author Share Posted July 12, 2008 (edited) Im not following what that does for me sorry but Im a little new at all this. If you dont mind how could I use that to make a short cut on my desktop that opens the folder "cdrom\I386\Extras" or set the CDROM to the same letter ever installreally all I want is a short cut that drops on to my desktop while xp installs that opens "cdrom\I386\Extras" Edited July 12, 2008 by JayDogg Link to comment Share on other sites More sharing options...
JayDogg Posted July 12, 2008 Author Share Posted July 12, 2008 come on is there someone that could help me or at least explain what this guy was trying to tell me? Please it would help so much =) Link to comment Share on other sites More sharing options...
cdob Posted July 12, 2008 Share Posted July 12, 2008 (edited) The classic approach:@echo offset directory=variable\I386\Extrasfor %%a 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 %%a:\%directory% start "%%a:\%directory%"Added:Now the first thing I tried was I put a short cut to "D:\I386\Extras" in the $OEM$ which worked just fineI don't understand clearly: How do you create a short cut?A environment variable approach: cmdlines.txt[COMMANDS]CDROM.cmdCDROM.cmdreg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "CDROM" /t REG_SZ /d "%~d0" /fEnvironment variable valid after boot.Or use setx.exe http://support.microsoft.com/kb/927229Environment variable is active imediately. Edited July 12, 2008 by cdob 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