MioKawaii Posted June 22, 2005 Share Posted June 22, 2005 I'm trying to import the following line into registry :XCOPY /Y "H:\Appz\GAIM\Setting\*.*" "D:\Documents and Settings\Mio\Application Data"Running from RunOnceEx.cmd with the following line:REG ADD %KEY%\016 /V 2 /D "XCOPY /Y "\"%CDROM%\Appz\GAIM\Setting\*.* %UserProfile%\Application Data""\ " /fWill only get this in the registry (missing double quotes):XCOPY /Y "H:\Appz\GAIM\Setting\*.* D:\Documents and Settings\Mio\Application Data"Please help me to get the correct line! Link to comment Share on other sites More sharing options...
Yzöwl Posted June 22, 2005 Share Posted June 22, 2005 (edited) Try something like this:reg add %KEY%\016 /v 2 /d "%systemroot%\system32\xcopy.exe \"H:\Appz\GAIM\Setting\*.*\" \"D:\Documents and Settings\Mio\Application Data\" /i/q/k/y" /fIt should all be on one line!<Edit>Are you sure you are just copying files from inside 'Setting' to 'Application Data'.I would have expected them to at least be going into a directory.</Edit> Edited June 22, 2005 by Yzöwl Link to comment Share on other sites More sharing options...
MioKawaii Posted June 22, 2005 Author Share Posted June 22, 2005 (edited) @YzöwlHahaha....,LOL! I follow the tutorial of RunOnceEx on MSFN strictly and it turn out to be wrong. The tutorial specify that:You will find that if you add additional " " quotation marks in the REG ADD entries, it won't be imported to the Windows Registry. To work around this, use a backslash \" for every quotation you intend to add, for example:%KEY%\005 /V 1 /D "\"%systemdrive%\install\AdobeReader6\Adobe Reader 6.msi\" /qn" /fBy doing this, you can execute applications that contain spaces in the filename, or application switches that need to be enclosed in quotations.If there is an application that has a series of complicated switches with lots of quotation marks, consider putting them into a separate .cmd file instead and launching from RunOnceEx, because it would get too messy putting those switches directly into RunOnceEx.http://unattended.msfn.org/intermediate/me...s/runonceex.htmThe tutorial said "a backslash" but it coloured the backslash and double quote with red. So the correct on should be \ instead of \". Guess I am the only retard cause nobody got it wrong!You're the man Yzöwl! BTW, you spot my mistake again. It is to be copy into a folder:REG ADD %KEY%\016 /V 2 /D "XCOPY \"%CDROM%\Appz\GAIM\.Gaim\*.*\" \"%UserProfile%\Application Data\.Gaim\" /I/K/Q/Y " /fThanks again. Edited June 23, 2005 by MioKawaii Link to comment Share on other sites More sharing options...
Yzöwl Posted June 22, 2005 Share Posted June 22, 2005 Well in that case, your command should still look more like this:reg add %KEY%\016 /v 2 /d "%systemroot%\system32\xcopy.exe %CDROM%\Appz\GAIM\.Gaim \"%AppData%\" /r/h/i/q/y" /fObviously the switches will depend upon your own situation and once again the code should all be on one line. Link to comment Share on other sites More sharing options...
Astalavista Posted June 23, 2005 Share Posted June 23, 2005 hello sir,wouldnt it be easier to create a Winrar SFX and have it extractto where u want it? You get the benefit of compression and silent instraction.just a thought. Link to comment Share on other sites More sharing options...
MioKawaii Posted June 23, 2005 Author Share Posted June 23, 2005 @AstalavistaThank you for your reply. Packing it with an archiever is a good idea if the pupose is only to copy the files to a location but that's just an example of things that I'm trying to do. For instant, insert command lines to the RunOnceEX.cmd to do an installation of 23 Firefox extentions which is previously run from a seperate batch file. Link to comment Share on other sites More sharing options...
Alanoll Posted June 23, 2005 Share Posted June 23, 2005 (edited) I think you might have misunderstood what i was trying to say...REG ADD %KEY%\016 /V 2 /D "XCOPY /Y "\"%CDROM%\Appz\GAIM\Setting\*.* %UserProfile%\Application Data""\ " /fEverywhere you were adding the \" you added a "\" which is unneccasary and syntactically wrong. Instead think of it more like, "Alright, I need a quote here and here in this command. Alright, let's put those in." Since those quotes are undoubtedly not the outer ones (by this i mean, the one just after the /D and just before the /F) then you'll need to put a \ before them. That's all that the guide was trying to say...So in this instance, you would need a \ before the quote just after the /Y and a \ just before the quote after Application Data since these are the embedded quotes. It appears you have an extra quote at the end of the line above, which is syntax error and would screw up the importation of the line. Edited June 23, 2005 by Alanoll 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