[comp.sys.ibm.pc] 'BASIC' PROGRAMMING QUESTIONS.

tonk@pesnta.UUCP (Andrew McArthy. ) (12/18/86)

=====  Eat this line.....PLEASE!! ======


	I have two 'basic' questions:

     1. Can anyone please tell me how to 'hide' a program
	which should be executable through the autoexec.bat?

     2. I just bought a program called "Mind Prober" from
	The Human Edge.
	I put it on my hard disk (copy a:*.* c:), but when
	I start this program from the hard disk, the program
	in the opening screen looks at the a: drive.
	Obviously it can't find it, and tells me that the
	program (on the hard disk) is an illegal copy.
	So I made another copy (from a: to b:) and stuck this
	copy into the a: drive with the same result.

	Now, my question is: Can anyone please tell me how to do
	this in basic?  I'm not interested in unraveling this
	program, but I would like to use this routine in my
	own programs.



	THANKS!

	Andy McArthy
	!pesnta!tonk
	e-mail: 72725.151

crimmins@uxc.cso.uiuc.edu (12/19/86)

/* Written  7:04 pm  Dec 17, 1986 by tonk@pesnta.UUCP in uxc.cso.uiuc.edu:comp.sys.ibm.pc */
>    1. Can anyone please tell me how to 'hide' a program
>	which should be executable through the autoexec.bat?

Here are two small programs, called hide.com and unhide.com, that will
hide or unhide any file or directory.  If an executable file is hidden,
It will still be found.  I have hidden my autoexec.bat, config.sys, and
command.com in the root directory without any problems.

========== CUT HERE ==========
begin 644 hide.com
M#A^[@``NB@<*P'06F`/80R[&!P"Z@@"X`4.Y`@#-(>L,D(S(CMBZ,@&T"<TA
MN`!,S2$-"E5S86=E.B!(241%(%MD<FEV93I=6W!A=&A<769I;&5S<&5C+GAX
F>`T*"@<D````````````````````````````````````````````
`
end
========== END HIDE.COM ======

========== CUT HERE ==========
begin 644 unhide.com
M#A^[@``NB@<*P'06F`/80R[&!P"Z@@"X`4.Y``#-(>L,D(S(CMBZ,@&T"<TA
MN`!,S2$-"E5S86=E.B!53DA)1$4@6V1R:79E.EU;<&%T:%Q=9FEL97-P96,N
F>'AX#0H*!R0`````````````````````````````````````````
`
end
========== END UNHIDE.COM ====

These are in standard uuencoded format.  uuencode and uudecode should
be available on your system.  If they are not, they were posted to
net.sources not too long ago.

>     2. I just bought a program called "Mind Prober" from
>	The Human Edge.
>	I put it on my hard disk (copy a:*.* c:), but when
>	I start this program from the hard disk, the program
>	in the opening screen looks at the a: drive.
>	Obviously it can't find it, and tells me that the
>	program (on the hard disk) is an illegal copy.
		.
		.
>	Now, my question is: Can anyone please tell me how to do
>	this in basic?  I'm not interested in unraveling this
>	program, but I would like to use this routine in my
>	own programs.

This is a copy protection scheme, and it is looking for a "key" disk
in drive A:.  These disks are physically marked with a "signature" area,
so making a copy of the disk won't help (as you found out).  These
floppies are available at your local computer store in small quantities (2?)
so you can protect your own programs.

You may find that protecting your software is not beneficial.  Think
about how your users will react to having to use a key disk on a hard-
disk based system before you make a mistake.

----
Dan Crimmins
University of Illinois at Urbana-Champaign
Computing Services Office - Micro Consulting Dept.

ARPA:	crimmins@uiucuxc.cso.uiuc.edu
BITNET:	crimmins@uiucuxc.bitnet
CSNET:	crimmins@uiucuxc.csnet
UUCP:	{ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!crimmins