Rico.JohnnY Posted June 7, 2004 Posted June 7, 2004 i find a post below...but i am not sure about how to use it in a RunOnceEx.cmd file.http://www.msfn.org/board/index.php?&showtopic=10798&hl=i tried time and time again..but still didnt work.i used the %CDROM1% variable and installed my apps from a CD,but every time in RunOnceEx setup, an error occured,and the CD drive part of an app's installation path seemed to be blank..why was that?
Vadikan Posted June 7, 2004 Posted June 7, 2004 unattended.msfn.org suggests the following for runonceex.cmd (with marker CD.txt on the CD)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:http://unattended.msfn.org/xp/runonceex_cd.htmSame results can be achived with FOR %%d 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 %%d\CD.txt SET CDROM=%%d
Alanoll Posted June 7, 2004 Posted June 7, 2004 you'd have to import the settings into the session manager via Registry tweaks.SETX may prove to be helpful as well.
Vadikan Posted June 8, 2004 Posted June 8, 2004 but i want a permanent one..Look at the bottom of this page.
sleepnmojo Posted June 8, 2004 Posted June 8, 2004 I use the following two lines in my runonceex.cmd file. They are two variables I find useful.SETX CDROM %~d0 -mSETX DEFAULTUSERPROFILE "%USERPROFILE%" -mYou can get setx off the xp cd, in the support folder. The CDROM one is only useful if you plan on using the xp cd for installations. Otherwise, using the if cdrom, blah blah works.
Rico.JohnnY Posted June 8, 2004 Author Posted June 8, 2004 I use the following two lines in my runonceex.cmd file. They are two variables I find useful.SETX CDROM %~d0 -mSETX DEFAULTUSERPROFILE "%USERPROFILE%" -mYou can get setx off the xp cd, in the support folder. The CDROM one is only useful if you plan on using the xp cd for installations. Otherwise, using the if cdrom, blah blah works.i cant find it in the xp cd suport folder.is it a tool or just an instrution?
sleepnmojo Posted June 8, 2004 Posted June 8, 2004 i cant find it in the xp cd suport folder.is it a tool or just an instrution?on mine, it is undersupport\tools\support.cablook for setx.exe
Rico.JohnnY Posted June 8, 2004 Author Posted June 8, 2004 SETX CDROM %~d0 -mit does not seem to work...what does the %~d0 stand for?i use a DVD rom..so how to configure the variable to match my own CDROM?
sleepnmojo Posted June 8, 2004 Posted June 8, 2004 SETX CDROM %~d0 -mit does not seem to work...what does the %~d0 stand for?i use a DVD rom..so how to configure the variable to match my own CDROM? It has to run in a cmd file and on the CD/DVD. I put this command in my runonceex.cmd file, which i call with command lines. You can put it in another cmd file if you wish, but it has to be on the cd.%~d0 is a variable. It says give me the drive of the first arguement, which is the script.
Rico.JohnnY Posted June 8, 2004 Author Posted June 8, 2004 so...do i have to copy the setx.exe to system32 folder during setup?
sleepnmojo Posted June 8, 2004 Posted June 8, 2004 so...do i have to copy the setx.exe to system32 folder during setup?It would have to be in your path somewhere. I generally throw it in system32.
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