tim Posted July 16, 2004 Posted July 16, 2004 Here is how:SET CDROM=%CD:~0,2%That's it. Do this at the top of any .CMD file(s) that run from the install CD.To find out how this works, start a CMD.EXE session and type SET /?
Alanoll Posted July 16, 2004 Posted July 16, 2004 this will only work from CMDLINES.TXT if the CMD file is on CD. Won't work from SVCPACK or GUIRUNONCE.So you know.
tim Posted July 16, 2004 Author Posted July 16, 2004 this will only work from CMDLINES.TXT if the CMD file is on CDFrom reading the many post here, that is what most people want it for.e.g. setting RunOnce keys and the like.
Alanoll Posted July 16, 2004 Posted July 16, 2004 some people also use a normal batch file with ECHO commands to tell them what's going on (the "basic" method, where as RunOnceEX is the "advanced" method) and so they use GUIRunOnce. Thought i should post that it won't there as expected so they don't complain later on. Though this does simplify all those IF EXIST lines for people using CMDLINES.TXT to install something from ONE cd. It won't work with two CDs if they are in different drives however. (I'm just listing possibilities that people may try to use this with)
tim Posted July 16, 2004 Author Posted July 16, 2004 Ok, just trying to help.For what I need it does me fine.and it's neat , I like that
Guest zippy Posted July 16, 2004 Posted July 16, 2004 1 thread/per month about sharing %CDROM%...%CD%, %0, SourcePath...etc... depends on how/where you use it...
my2001 Posted July 17, 2004 Posted July 17, 2004 SET CDROM=%CD:~0,2%How's that working? I just mean: it's really neat , but what kind of command is that? I've never seen it before.
DarkPhoenix Posted July 17, 2004 Posted July 17, 2004 %CD% is your Current Directory, and since the RunOnceEx file will be run off the CD (Compact Disk this time ) the drive letter of the %CD% will be the CD. So.. what that command does, is to pull out the two first letters from the %CD% variable, so that if %CD% for instance is"F:\$OEM$", then %CD:~0,2% will return "F:" only. (0,2 means begin at position 0 and read the next two letters. 2,6 would return "\$OEM$", if you understand? )
my2001 Posted July 17, 2004 Posted July 17, 2004 0,2 means begin at position 0 and read the next two letters. 2,6 would return "\$OEM$", if you understand? )Cool, thx! Sure I understand ... but what I didn't know just seconds ago is that syntax. Haven't seen it before and didn't know it exists. Thx again!
tim Posted July 17, 2004 Author Posted July 17, 2004 Sure I understand ... but what I didn't know just seconds ago is that syntax. Haven't seen it before and didn't know it exists. Thx again!Oh good, at least my post was some use to somebody To find out how this works, start a CMD.EXE session and type SET /?
prathapml Posted July 17, 2004 Posted July 17, 2004 @timthat's simply fantastic.You da' wizard, dude!Oh good, at least my post was some use to somebodySomebody? Well, make that lots of buddies
neophyte Posted July 18, 2004 Posted July 18, 2004 You could actually use that to set a permanent variable of %CDROM%
enuffsaid Posted July 18, 2004 Posted July 18, 2004 That's a good find, Tim. And thanks for sharing it, too! Sorry about the people giving you a hassle for posting something interesting. They're just jealous of you, as they probably never have something to contribute themselfves. Plenty people are grateful!Thanks!eNuffSaidEDIT: Typos
enuffsaid Posted July 18, 2004 Posted July 18, 2004 1 thread/per month about sharing %CDROM%...Thanks for this vital information, zippy
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