nivek7 Posted August 25, 2004 Share Posted August 25, 2004 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"thanksedit: 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 More sharing options...
nivek7 Posted August 25, 2004 Author Share Posted August 25, 2004 anyone? Link to comment Share on other sites More sharing options...
Vann Posted August 25, 2004 Share Posted August 25, 2004 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 More sharing options...
jaclaz Posted August 25, 2004 Share Posted August 25, 2004 To make it safe, you should always run the command like this: xcopy32 [source]:\*.* [destination]\*.* /i /s /e /r /v /k /f /c /h orxcopy32 [source]:\*.* [destination]\*.* /i /s /e /r /v /k /f /c /h /yif 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!orI SERVe Kentucky Fried Chicken Hot, Yeah!jaclaz Link to comment Share on other sites More sharing options...
nivek7 Posted August 25, 2004 Author Share Posted August 25, 2004 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 More sharing options...
Vann Posted August 25, 2004 Share Posted August 25, 2004 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 More sharing options...
nivek7 Posted August 25, 2004 Author Share Posted August 25, 2004 But i create my users before runonceex... would that affect it? Link to comment Share on other sites More sharing options...
nivek7 Posted August 26, 2004 Author Share Posted August 26, 2004 so here is my problem...REG ADD %KEY%\070 /VE /D "Mozilla Firefox 9.3" /fREG ADD %KEY%\070 /V 1 /D "%systemdrive%\install\Firefox\install.exe /qb" /fREG ADD %KEY%\070 /V 2 /D "xcopy.exe /y /s /e /I \"%systemdrive%\install\firefox\newA\" \"%systemdrive%\Documents and Settings\%username%\Application Data\Mozilla\" /fREG ADD %KEY%\070 /V 3 /D "%systemdrive%\install\Firefox\flashplayer7installer.exe /s" /fbut it copies to C:\Documents and Settings\Application Data\Mozilla instead... Link to comment Share on other sites More sharing options...
nivek7 Posted August 26, 2004 Author Share Posted August 26, 2004 do i have to do anything with the variable %username% to make it work? Link to comment Share on other sites More sharing options...
MCT Posted August 26, 2004 Share Posted August 26, 2004 hi, use%appdata% it replaces %systemdrive%\Documents and Settings\%username%\Application Data Link to comment Share on other sites More sharing options...
nivek7 Posted August 26, 2004 Author Share Posted August 26, 2004 ill try that, thanks Link to comment Share on other sites More sharing options...
nivek7 Posted August 27, 2004 Author Share Posted August 27, 2004 arg... it copies it to C:\ when i tell it to copy to %appdata%\mozilla (im pretty sure it does... but im sure it did not copy to the right location)... this makes no sense to me :S Link to comment Share on other sites More sharing options...
ctfb Posted August 27, 2004 Share Posted August 27, 2004 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.cmdcmdow @ /HID@echo offIF 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\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\001 /VE /D "Copying i386 Directory" /fREG ADD %KEY%\001 /V 1 /D "%systemdrive%\install\i386copy.cmd" /fi386copy.cmdrem cmdow @ /HID@ECHO OFF%systemdrive%\windows\system32\xcopy32.exe %CDROM%\i386 /e /k /h /i /y %systemdrive%\i386The 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 More sharing options...
nivek7 Posted August 28, 2004 Author Share Posted August 28, 2004 anyone know how to get the variables working? Link to comment Share on other sites More sharing options...
jrzycrim Posted August 28, 2004 Share Posted August 28, 2004 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 More sharing options...
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