Jump to content

Recommended Posts

Posted

I dont know how to do the silent install for certian programs and dont have time given im attending two schools, have a full time job and a girlfriend (so...two full time jobs) I wrote a small batch file to copy the install files straight to the desktop. Then I wrote another one to delete the files after I have installed them, only I cant find a switch that works without having to answer "Y" and enter after each one. Here is the batch file. If I miss anything or you need more information please let me know.

CLS

@ECHO off

Title * * * Time To Clean Your Desk * * *

Echo.

Echo Deleting Setup Program Files

DEL "%systemdrive%\Install\FreeAV" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

DEL "%systemdrive%\Install\REGISTRY" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

DEL "%systemdrive%\Install\VCDgear" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

DEL "%systemdrive%\Install\Riochet" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

DEL "%systemdrive%\Install\dB PowerAMP" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

pause


Posted (edited)

Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

 names         Specifies a list of one or more files or directories.
               Wildcards may be used to delete multiple files. If a
               directory is specified, all files within the directory
               will be deleted.

 /P            Prompts for confirmation before deleting each file.
 /F            Force deleting of read-only files.
 /S            Delete specified files from all subdirectories.
 /Q            Quiet mode, do not ask if ok to delete on global wildcard
 /A            Selects files to delete based on attributes
 attributes    R  Read-only files            S  System files
               H  Hidden files               A  Files ready for archiving
               -  Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

Or it looks like you want to delete the entire folders.

Try the RD command.

Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

   /S      Removes all directories and files in the specified directory
           in addition to the directory itself.  Used to remove a directory
           tree.

   /Q      Quiet mode, do not ask if ok to remove a directory tree with /S

Echo Deleting Setup Program Files
RD /S /Q "%systemdrive%\Install\FreeAV" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\REGISTRY" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\VCDgear" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\Riochet" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\dB PowerAMP" "%systemdrive%\Documents and Settings\All Users\Desktop"

P.S. You can find most cmd switches by typing the command and using the switch /?

Edited by Siginet

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