Jump to content

Overwriting a File Silently ?


fourte3n

Recommended Posts

I am overwriting a file after installation and want to know how to do this silently so that I'm not asked if it's ok.

Here is an example of what I have in my 'cleanup.cmd'

COPY "%systemdrive%\install\emule\server.met" "%systemdrive%\Program Files\emule\"

What else is needed?

Link to comment
Share on other sites


did you even try to open up a command prompt and typing

COPY /?

if you did, you would have gotten

Copies one or more files to another location.

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
    [+ source [/A | /B] [+ ...]] [destination [/A | /B]]

 source       Specifies the file or files to be copied.
 /A           Indicates an ASCII text file.
 /B           Indicates a binary file.
 /D           Allow the destination file to be created decrypted
 destination  Specifies the directory and/or filename for the new file(s).
 /V           Verifies that new files are written correctly.
 /N           Uses short filename, if available, when copying a file with a
              non-8dot3 name.
 /Y           Suppresses prompting to confirm you want to overwrite an
              existing destination file.
 /-Y          Causes prompting to confirm you want to overwrite an
              existing destination file.
 /Z           Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.  Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).

Link to comment
Share on other sites

first you take your server.met

you winrar it

after you winrar it

you go back to winrar and u create a SFX (self extracting file)

go to advance options, select the location you want the file to extract to

specify silent install, over write files

rename the file to servermet.exe

in your runonceex.cmd

after you install Emule Plus or Emule doesn't really matter

you put the servermet.exe

like so.

reg add %Key%\002 /V 5 /D "%CDROM%\Software\Emule\Servermet..exe" /f

since i see your are using %systemdrive% method all u need to

is replace my "%CDROM%\Software\

to %systemdrive%\install\

Link to comment
Share on other sites

thankyou battleangel for explaining it without out being rude like other people.

Alanoll sometimes people simply don know that you can DO these things... so try writing in a less sarcastic manner.

/y it is!!

and Astalavista... the server.met was an example not what i am actually doing. Thankyou for your help thou.

Link to comment
Share on other sites

Alanoll sometimes people simply don know that you can DO these things... so try writing in a less sarcastic manner.
Sorry, but assuming you read anything on unattended.msfn.org which I'm sure you have atleast once....
Difficulty: Requires an intermediate experience of Microsoft Windows XP and a basic knowledge of how batch commands function.

to me, Basic knowledge includes a simple /? or /help or various other switches. It's like knowing /qb and /qn goes to WIndows Installer Files to make them silent.

But...

I shall try better next time at 11:38pm after being up for over 24 hours to not be sarcastic :)

Link to comment
Share on other sites

@allanoll I didn't know what /qb and /qn did and I really tried hard on google to find what it did and it's not an easy task. I finally found it after about 1 hour of searching, maybe a "basic dos knowledge" page should be added to the unattended guide, I still don't even know what's the difference between /y and -y, sometimes I have to use /others - sometimes it does not matter... But I really don't think you were rude and I was still able to complete my unattended (well can it sometime be complete? adding 7zip, updating softwares or virus defs..)

@fourte3n Jaclaz is right and allanoll is one of the most helping and kind guy on this forum (in other forums they don't even bother to answer you...) and I think that if you are trying to do your own unattended cd you must learn to try things, and trying /help or /? is the basic. When this does not work, and you looked on google and could not find any helpful sites, then you can post something here and people (well some of them) will be glad to help you out WHILE teaching you at the same time, you must be receptive

Link to comment
Share on other sites

good ones, why /qb and /qb- ???

difference between /qb /qn (it's the progress bar) and /qr ?

why sometime put the switches at the beggining and sometimes at the end?

why sometime use - instead of / and why combine those 2? what about \ then?

This may be ABC to programmers and scripters but lots of people here are also geeks without any formations, more guides should be created so the forum could breathe a little more

Link to comment
Share on other sites

well, I personally have read the tech articles of Windows installer.....

/qb is with progress bar

/qn is without.

It really shouldn't matter the order in the command line as long as /qb or /qn is AFTER the MSI.

If you want to go further, there is also /qb- /qn- /qb! /qn! on and on

Link to comment
Share on other sites

And what about /qr? anyway, i want to learn so if you could link to those article it would be nice, during that time i'll try to google the answer but as I told before, looking for switches on the net is not an easy task. I'm really curious what those switches do, what's the difference, and why -p"-s /v\"/qn\""

why - instead of , why \ why the " WHY WHY WHY??? Gotta find those tech articles :P

see ya

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