Jump to content

Recommended Posts


Posted

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.htm

Same 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

Posted

I use the following two lines in my runonceex.cmd file. They are two variables I find useful.

SETX CDROM %~d0 -m
SETX DEFAULTUSERPROFILE "%USERPROFILE%" -m

You 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.

Posted
I use the following two lines in my runonceex.cmd file.  They are two variables I find useful.

SETX CDROM %~d0 -m
SETX DEFAULTUSERPROFILE "%USERPROFILE%" -m

You 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?

Posted
SETX CDROM %~d0 -m

it 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?

Posted
SETX CDROM %~d0 -m

it 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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...