Jump to content

Recommended Posts

Posted

what is the command to copy with RunOnceEx? sorry if it has been posted before, i couldn't find it. i only found the one that works for .cmd

me=total noob :D


Posted
what is the command to copy with RunOnceEx? sorry if it has been posted before, i couldn't find it. i only found the one that works for .cmd

me=total noob :D

the reason you can do the xcopy, and not the copy is because copy is build into the shell. To do shell commands you would need an instance of one. if you want to run just one command, then its quite simple.

CMD.EXE /C COPY [args]
CMD.EXE /K COPY [args]

Posted

I have my software installs stored on the network at work, and have a copyapps.cmd file that is run in runonceex.cmd. At first I used the copy command and couldn't figure out why some of the software wasn't installing and it dawned on me the directories weren't being copied, so I switched the commands to xcopy, ran the cmd file, and they still don't copy the directories off of the network, after looking through google, I found switches to use with xcopy on the Microsoft site, which were /s and /e. /s tocopy directories and /e to copy them even if they're empty. After adding those, the copyapps.cmd file worked, and everything installed perfectly, except office xp, but I didn't call the right file. I would run your command if you're copying folders, and if it doesn't copy any subfolders, try adding these switches...

Posted

txt - file to be copied

c:/dir/txt -location

d:/txt - destination

What soul i put in runonceex.cmd to copy and overwrite ?

Posted

I have a cd2.cmd file which is supposed to prompt the user for disc 2 then copy everything on disc 2 to the hard drive.

that's not working, it seems to skip right over the copy part.

Should I change it so the copy part is done by runonce like this?

Here's what I'm trying to use now:

CLS
@ECHO OFF
ECHO.
ECHO Ejecting CD-ROM Drives...
ECHO If you are using a cd rom please remove it from
ECHO the cdrom drive and If you have a second cd place
ECHO it in the drive at this time please.
ECHO.
ECHO.
ECHO Wait till the cdrom/dvd drive quits blinking
ECHO and then press any key to continue.
start %systemdrive%\install\Tools\cdr open
ECHO.
PAUSE

IF EXIST %systemdrive%\install\runonce.cmd GOTO RUNBATCH
SET CDROM2=
IF EXIST D:\install\runonce.cmd SET CDROM2=D:
IF EXIST E:\install\runonce.cmd SET CDROM2=E:
IF EXIST F:\install\runonce.cmd SET CDROM2=F:
IF EXIST G:\install\runonce.cmd SET CDROM2=G:
IF EXIST H:\install\runonce.cmd SET CDROM2=H:
IF EXIST I:\install\runonce.cmd SET CDROM2=I:
IF EXIST J:\install\runonce.cmd SET CDROM2=J:
IF EXIST K:\install\runonce.cmd SET CDROM2=K:

ECHO Please be patient while files are copied to your hard drive.
start "" /wait xcopy %CDROM2%\install %systemdrive%\install\ /S /C /Q /H /Y
ECHO.

ECHO.
::ECHO Deleting Temp Installation Files...
::RD /S /Q %systemdrive%\install
::RD /S /Q %systemdrive%\Drivers
::ECHO.
EXIT

If I take the xcopy out of the batch and put it in runonceex as a seperate step, this should work? How could I determine the source drive letter?

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