home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 November / PCO_1198.ISO / filesbbs / os2 / win95key.arj / WIN95KEY.ZIP / install.cmd < prev    next >
Encoding:
Text File  |  1998-08-18  |  928 b   |  40 lines

  1. /*Installing win95key*/
  2.  
  3. ModuleName="WIN95KEY"
  4.  
  5. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  6. call SysLoadFuncs
  7.  
  8. KeyValue=SysIni("USER", "SYS_DLLS", "LoadOneTime")
  9. Installed=0
  10.  
  11. do i=1 to Length(KeyValue)
  12.    if Substr(KeyValue, i, Length(ModuleName)) = ModuleName then
  13.       Installed=1
  14. end
  15.  
  16. if Installed = 0 then
  17.   do
  18.  
  19.     NewKeyValue = Left(KeyValue, Length(KeyValue)-1) ModuleName||d2c(0)
  20.  
  21.     if SysIni("USER", "SYS_DLLS", "LoadOneTime", NewKeyValue) = '' then
  22.       do
  23.        say "Registered, copying.."
  24.        "@copy .\win95key.dll c:\os2\dll >nul 2>nul"
  25.        say "Done, please reboot."
  26.       end
  27.      else
  28.       do
  29.        say "Failed for unknown reason :("
  30.       end
  31.   end
  32.  else
  33.   do
  34.     say "Already installed, updating"
  35.     "@unlock c:\os2\dll\win95key.dll >nul 2>nul"
  36.     "@copy .\win95key.dll c:\os2\dll >nul 2>nul"
  37.     say "Probably done ;) Please reboot."
  38.   end
  39.  
  40.