home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / brandexe / readme.txt next >
Text File  |  1994-01-08  |  3KB  |  83 lines

  1. =======To BRAND and .EXE file===========
  2.  
  3. Several things need to be done in order to "brand" an .EXE file:
  4.  
  5. 1. In the .EXE file itself, you need to place several constants. The
  6. Implant function looks for a string of characters, usually 30 characters
  7. long, all the same, such as:
  8.    
  9. Global Const UserName$ = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  10. Global Const UserCo$   = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
  11. Global Const UserID$   = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
  12.  
  13. Note, each constant must have a different letter.
  14.  
  15.  
  16.  
  17. 2a. In SETUP1.FRM, install the following code in Form_Load():
  18.  
  19. Sub Form_Load ()
  20. .
  21. .
  22. .
  23.     '--------------------------------------------------------------------------------
  24.     'GET USER INFORMATION (name, company and serial number)
  25.     '-this section should be placed BEFORE the section that copies the files to the
  26.     '-destination subdirectory so that subsequent installations will already have the
  27.     '-user information installed.
  28.     '--------------------------------------------------------------------------------
  29.     title$ = dialogCaption$
  30.     caption1$ = "Please enter the following information.  Your serial number is found on your diskette."
  31.  
  32.     ShowUserDialog title$, caption1$, SourcePath$, outButton$
  33.  
  34.     If outButton$ = "exit" Then GoTo ErrorSetup
  35. .
  36. .
  37. .
  38. End Sub
  39.  
  40.  
  41.  
  42. 2b. Go to (general) / (declarations) section in SETUP1.FRM and enter the following code:
  43.  
  44. Sub ShowUserDialog (title$, caption1$, SourcePath$, outButton$)
  45.         Screen.Mousepointer = 11
  46.         Load UserDlg
  47.         UserDlg.caption = title$
  48.         UserDlg.Label1.caption = caption1$
  49.         UserDlg.SourcePath.tag = SourcePath$
  50.         CenterForm UserDlg
  51.         Screen.Mousepointer = 0
  52.         UserDlg.Show 1
  53.         
  54.         outButton$ = UserDlg.outButton.tag
  55.         Unload UserDlg
  56. End Sub
  57.  
  58.  
  59.  
  60. 3. Make sure and add USER.FRM to your SETUP1.MAK and recompile.
  61.  
  62.  
  63. The end result should be an installation which, with the FIRST installation, asks for the
  64. user name, company and serial number (usually, I put it on the installation diskette),
  65. however, will simply install on subsequent installations with the user name, company and
  66. serial number already in place - will not be asked again for the information.
  67.  
  68. If you like the programming, let me know.
  69.  
  70. C. Mark Teter, M.D.
  71. Indian Territory Software
  72. P. O. Box 52765
  73. Tulsa, Oklahoma   74152-0765
  74. CompuServe 72530,626
  75.  
  76.  
  77. As I said before, I no longer use this on my distribution diskettes, I want my programs to
  78. be as widely distributed as possible, but to note when booting that the program is an
  79. EVALUATION copy. Of course, the REGISTERED copy is the same. I simply send the customer an
  80. "authorization code" which is an encrypted code derived from the user's name. That way, the
  81. user can give a copy of my diskette to anothe person and the other person will see that it's
  82. an EVALUATION copy again, because they don't have the code and, even if they do, it will only
  83. register under the registered user's name.  cmt.