Article View: comp.os.msdos.programmer
Article #6642Re: Help on changing Copy
From: Gregory Youngblood
Date: Mon, 23 Nov 1992 06:14
Date: Mon, 23 Nov 1992 06:14
42 lines
2582 bytes
2582 bytes
sabre@microsupport.sas.upenn.edu (Andrew White) writes: > In article <v3gq0yl@lynx.unm.edu> moeur@chtm.eece.unm.edu (Bill Moeur) writes > >In article <Bxn4nE.8IH@news.cso.uiuc.edu> jlamb@ux4.cso.uiuc.edu (Jeffrey Ri > > > >>to kill machines. I'm not trying to write a virus. I made a bet with > >>a friend that the copy command (or any other internal dos command) > >>could be "turned off." What I want to do is simple. I want dos to access > >>a file called "copy.bat" whenever anyone types in a copy command. The > >>problem is that dos always checks for internal commands (copy) first, > >>so dos never even looks at copy.bat, it just declares invalid number of > >>parameters. I'm sure this can be avoided, but how? Again, I know it sounds > > > >If you're using DOS 5.0, try using doskey to alias the copy command to call > >your batch file which is called something beside copy.bat. > >for example: > > DOSKEY copy=copy2 $1 $2 > > My freshman year, we did something like this to a friend's computer > by using DEBUG to change the name the DIR command in COMMAND.COM to > DXR (or whatever), and then creating a hidden batch file in the > path called "DIR.BAT" that contained one line: > > @DIR C:\ > > so that whenever he did a DIR, he only saw the contents of the root > directory. It was quite funny. Anyway, you could change the COPY > command in a similar manner, albeit this is not a general solution > to the problem. I did something similar a while back using Norton's Disk Editor and modifying CD (in command.com) to ZZ and then used a program called Led's Change Directory (LCD) (renamed to CD on my system). This way whne I typed CD I had the 'smart' change directory program try to match the closest directory to what I typed. It was quite useful. Greg .-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-. . TCS Consulting Services P.O. Box 600008 St. Paul, MN 55106-0008 . . ..!srcsip!tcscs!zeta ..!src.honeywell.com!tcscs!zeta . .-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.
Technical Details
Message-ID:
<D3eouB3w165w@tcscs.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!uwm.edu!src.honeywell.com!tcscs!zetaReferences:
<98765@netnews.upenn.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!uwm.edu!src.honeywell.com!tcscs!zeta From: tcscs!zeta@src.honeywell.com (Gregory Youngblood) Newsgroups: comp.os.msdos.programmer Subject: Re: Help on changing Copy Keywords: Midnight Arrow Message-ID: <D3eouB3w165w@tcscs.UUCP> Date: Mon, 23 Nov 92 00:14:12 CST References: <98765@netnews.upenn.edu> Reply-To: zeta%tcscs@src.honeywell.com Organization: TCS Consulting Services Lines: 42