Jump to content

cdrom xcopy from cmdlines, help!


Recommended Posts

For some reason, files don't get copied from the cdrom to the drive. I've read numerous threads relating to the topic, but what works for others doesn't seem to work for me:

cmdlines.txt

[commands]
"regedit.exe /s controlpanel.reg"
"regedit.exe /s internetexplorer.reg"
"regedit.exe /s internetsettings.reg"
"regedit.exe /s windowsexplorer.reg"
"regedit.exe /s services.reg"
"regedit.exe /s regtweaks.reg"
"software.cmd"
"rundll32 setupapi,InstallHinfSection XP 128 runonceex.inf"
"rundll32 iernonce.dll,RunOnceExProcess"

software.cmd

if exist e:\Win51 set cdrom=e:
if exist f:\Win51 set cdrom=f:
if exist g:\Win51 set cdrom=g:
if exist h:\Win51 set cdrom=h:
if exist i:\Win51 set cdrom=i:
if exist j:\Win51 set cdrom=j:
xcopy %cdrom%\software\*.* d:\software\*.* /e
attrib -r d:\software\*.* /s
set /p variable=hit_enter

I never even got a prompt from the set /p command. Contents of

%cdrom%\$oem$\

includes cmdlines.txt and software.cmd

runonceex.inf does go thru its paces, and complains that a file in d:\software\ could not be found (cause they never get copied from the cd)

I'm ready to throw in the towel, if you see something obvious please holler.

Thanks

edit:

FYI, I make two partitions: c:\ for windows, d:\ for user data. Some software is "Green" (see http://tinyapps.org/faq.html for definition), so I just copy it to d:\software\_runable\%appname% and it will never have to be installed again + user settings will remain in a nice little ini file in the same folder. Then came registry nightmare.

Link to comment
Share on other sites


I'm busy with other stuff, but I will get back to this when time allows. Thanks for the replies.

tguy and durex: The following is from dos help files at computerhope.com:

XCOPY source [destination][/A | /M] [/D[:date]] [/P] [/s [/E]] [/W] [/C] [/Q] [/F] [/L] [/H] [/R] [/T] [/K] [/N]

source Specifies the file(s) to copy.

destination  Specifies the location and/or name of new files.

According to this, you must specify file(s) for source and destination. The command as I have in prior post works fine in a running XP system. However, so does:

xcopy %cdrom%\software d:\software\ /e

I will try the above command on next install attempt, along with PAUSE from Alanoll. I think I will get virtualpc. I've been burning a cd each time.

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I found the problem, and I'm not going to be very popular... when I burned the cd, I manually chose all the files that would go on the cd, and I didn't include my "software.cmd". Why didn't I check this earlier? I don't know.

Link to comment
Share on other sites

  • 1 month later...

Just wanted to add, that software.cmd and runonceex.inf get processed simultaneously, and the second time I noticed (different puter) that runonceex.inf gave an error because it tried for a file before software.cmd finished copying it. I'm going to try to include the file copying within runonceex.inf, because things get done sequentially here... I think cmdlines method may have a timeout for each line?

edit:

runonceex.inf items get processed sequentially, but not the way I was running commands:

HKLM,"%RunOnceEx%\01",,,"Copying User Software"

HKLM,"%RunOnceEx%\01",1,,"hidden_cmd.lnk /q /c xcopy %1%\software\*.* d:\software\ /c /e /q /h"

HKLM,"%RunOnceEx%\02",,,"Removing All File Attributes"

HKLM,"%RunOnceEx%\02",1,,"hidden_cmd.lnk /q /c attrib -r -a -s -h c:\*.* /s /d"

HKLM,"%RunOnceEx%\02",2,,"hidden_cmd.lnk /q /c attrib -r -a -s -h d:\*.* /s /d"

You can see above that I have hidden_cmd.lnk (attached). What's special about this shortcut is that it specifies the command window to a position on the screen that is NOT on the screen. Thus you don't see a command window while you see the runonceex rundll32 process happen. The problem is that the shortcut gets executed and rundll32 moves on to the next step, even though xcopy isn't done.

Bummer. There are around 800 files and 80 folders and there is no way I am writing an inf file for this. The command windows are starting to appear really beautiful all of a sudden. Does cmdow.exe have this shortcomming? (edit: no because cmdow runs inside of your calling cmd.exe) cmdow.exe details here:

http://unattended.msfn.org/intermediate/me...s/runonceex.htm

Oh... there is another way... using the OEM folders. I want to copy stuff to d:\

I've seen the syntax for specifying a driver letter two different ways:

$OEM$\$D <--Gosh

$OEM$\D <--Dave

Where D is the drive letter D, but could be any. Either works? (edit: Dave's syntax works... probably Gosh had typo)

Link to comment
Share on other sites

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