home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10854 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.9 KB

  1. Path: sparky!uunet!spool.mu.edu!darwin.sura.net!jvnc.net!netnews.upenn.edu!microsupport.sas.upenn.edu!sabre
  2. From: sabre@microsupport.sas.upenn.edu (Andrew White)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Help on changing Copy
  5. Keywords: Midnight Arrow
  6. Message-ID: <98765@netnews.upenn.edu>
  7. Date: 23 Nov 92 02:57:18 GMT
  8. References: <Bxn4nE.8IH@news.cso.uiuc.edu> <v3gq0yl@lynx.unm.edu>
  9. Sender: news@netnews.upenn.edu
  10. Organization: University of Pennsylvania
  11. Lines: 30
  12. Nntp-Posting-Host: microsupport.sas.upenn.edu
  13.  
  14. In article <v3gq0yl@lynx.unm.edu> moeur@chtm.eece.unm.edu (Bill Moeur) writes:
  15. >In article <Bxn4nE.8IH@news.cso.uiuc.edu> jlamb@ux4.cso.uiuc.edu (Jeffrey Richard Lamb) writes:
  16. >
  17. >>to kill machines. I'm not trying to write a virus. I made a bet with
  18. >>a friend that the copy command (or any other internal dos command)
  19. >>could be "turned off." What I want to do is simple. I want dos to access
  20. >>a file called "copy.bat" whenever anyone types in a copy command. The
  21. >>problem is that dos always checks for internal commands (copy) first,
  22. >>so dos never even looks at copy.bat, it just declares invalid number of
  23. >>parameters. I'm sure this can be avoided, but how? Again, I know it sounds
  24. >
  25. >If you're using DOS 5.0, try using doskey to alias the copy command to call
  26. >your batch file which is called something beside copy.bat.
  27. >for example:
  28. >     DOSKEY copy=copy2 $1 $2
  29.  
  30. My freshman year, we did something like this to a friend's computer
  31. by using DEBUG to change the name the DIR command in COMMAND.COM to
  32. DXR (or whatever), and then creating a hidden batch file in the
  33. path called "DIR.BAT" that contained one line:
  34.  
  35. @DIR C:\
  36.  
  37. so that whenever he did a DIR, he only saw the contents of the root
  38. directory.  It was quite funny.  Anyway, you could change the COPY
  39. command in a similar manner, albeit this is not a general solution
  40. to the problem.
  41. -- 
  42. Andrew White                  |  Dod #0584
  43. sabre@quantum.sas.upenn.edu   |  '82 Honda Sabre v45       
  44.