Jump to content

Copying Problem


Recommended Posts

Sorry if this has been posted before, but i searched and could not find it.

Sometimes this happens, sometimes it doesn't. Sometimes when I use this command:

[CODEREG ADD %KEY%\070 /V 2 /D "xcopy.exe /y /s /e \"%systemdrive%\install\firefox\newA\" \"%systemdrive%\Documents and Settings\Nivek\Application Data\Mozilla\"

it gives me this:


Does C:\Documents and Settings\Nivek\Application Data\Mozilla specify a file name or directory name on the target
<F = file, D = directory>?

then you have to put in F or D, but i want it to use D every time... most of my xcopy's dont give me this though they use the same "structure"

thanks

edit: i think this only happens when the directory im copying to doesn't exist.. is there a way i can create a new directory from runonceex?

Link to comment
Share on other sites


I sent an email to my super-secret Microsoft insider by issuing the command xcopy /? and he responded almost instantly, telling me

/I           If destination does not exist and copying more than one file,
              assumes that destination must be a directory.

Link to comment
Share on other sites

To make it safe, you should always run the command like this:

 

xcopy32 [source]:\*.* [destination]\*.* /i /s /e /r /v /k /f /c /h
or
xcopy32 [source]:\*.* [destination]\*.* /i /s /e /r /v /k /f /c /h /y
if you don't have it in your COPYCMD

Note:

Xcopy is just a redirection to XCOPY32

/s and /e could be condensed in just /e, but as Nick Rage put it,

We even made it easy to remember..

I SERVe Kentucky Fried Chicken Hot!

or

I SERVe Kentucky Fried Chicken Hot, Yeah!

jaclaz

Link to comment
Share on other sites

lol, thanks for the replys... i have one more question, how do i make it copy to here:

%systemdrive%\Documents and Settings\<username>\Applicatation Data ?

what do i put in username? i tried %username% but it didn't work

Link to comment
Share on other sites

If the username is static just put in whatever the username is. Otherwise, if you copy it to the Default User directory during the installation process it will get copied to every user whenever their account is first created.

Link to comment
Share on other sites

so here is my problem...

REG ADD %KEY%\070 /VE /D "Mozilla Firefox 9.3" /f
REG ADD %KEY%\070 /V 1 /D "%systemdrive%\install\Firefox\install.exe /qb" /f
REG ADD %KEY%\070 /V 2 /D "xcopy.exe /y /s /e /I \"%systemdrive%\install\firefox\newA\" \"%systemdrive%\Documents and Settings\%username%\Application Data\Mozilla\" /f
REG ADD %KEY%\070 /V 3 /D "%systemdrive%\install\Firefox\flashplayer7installer.exe /s" /f

but it copies to C:\Documents and Settings\Application Data\Mozilla instead...

Link to comment
Share on other sites

An Xcopy thread is just what I needed. My problem is different though, as I cannot get xcopy to run at all, it just skips to the next install. I call a .cmd file from RunOnceEx.cmd to copy the i386 directory to the hard drive. I don't want to use drive lettes as they may change so I've set it up like:

RunOnceEx.cmd

cmdow @ /HID
@echo off

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:
IF EXIST K:\CD.txt set CDROM=D:
IF EXIST L:\CD.txt set CDROM=E:
IF EXIST M:\CD.txt set CDROM=F:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\001 /VE /D "Copying i386 Directory" /f
REG ADD %KEY%\001 /V 1 /D "%systemdrive%\install\i386copy.cmd" /f

i386copy.cmd

rem cmdow @ /HID
@ECHO OFF
%systemdrive%\windows\system32\xcopy32.exe %CDROM%\i386 /e /k /h /i /y %systemdrive%\i386

The registry entries appear normal, i386copy.cmd is called, but xcopy dosn't run.

If I run i386copy.cmd by just launching it, it works fine every time, but not when called from RunOnceEx. Any ideas?

Oh, if I put the xcopy line directly in RunOnceEx.cmd and have xcopy execute from the regisrty it does work but shows the command window. I want to keep it clean looking during the install.

Thanks,

-Mike

Link to comment
Share on other sites

Move this to your I386Copy.cmd:

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:
IF EXIST K:\CD.txt set CDROM=D:
IF EXIST L:\CD.txt set CDROM=E:
IF EXIST M:\CD.txt set CDROM=F:

Those variables are no longer set after reboot which is when your I386copy.cmd is executed.

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