home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / DUTI / CDPAT002.ZIP / NWIN.BAT < prev   
DOS Batch File  |  1998-04-01  |  2KB  |  77 lines

  1. @echo off
  2.  :      Run Windows on the network
  3.  :
  4.  :      If we're already in Windows, don't start again
  5.  inwin
  6.  if errorlevel 1 goto nocando
  7.  :
  8.  :      Make sure TEMP is defined
  9.  if []==[%temp%] set temp=c:\dos
  10.  :
  11.  :      Preserve path where we started
  12.  cdpath >%temp%\winreset.bat
  13.  :
  14.  :      Create some directories
  15.  mkpath /n c:\wp f:\wp f:\draw f:\ss f:\cfg f:\misc
  16.  :
  17.  :      Make sure we're at the root of these dirs
  18.  cd u:\
  19.  cd x:\
  20.  cd y:\
  21.  :
  22.  :      Goto Windows home directory (where WIN.COM is located)
  23.  mkpath %win.home%
  24.  :
  25.  :      Set Windows' DOS prompt
  26.  set winpmt=$e[47;31m EXIT to return to Windows! $e[37;44m$_$p $g
  27.  :
  28.  :      _p_ is used by some programs, so before we run out of env. space...
  29.  set _p_=!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!
  30.  :
  31.  :      Audit trail
  32.  tmsg * WIN3.1 in
  33.  :
  34.  :      Don't want NetWare messages
  35.  castoff
  36.  :
  37.  :      Run Windows
  38.  win %1 %2 %3 %4 %5
  39.  :
  40.  :      Make sure we're at the root of these dirs in case the user changed them
  41.  cd u:\
  42.  cd x:\
  43.  cd y:\
  44.  cd %netdrv.app%\
  45.  cd c:\
  46.  :
  47.  :      Receive NetWare messages again
  48.  caston
  49.  cls
  50.  :
  51.  :      Audit trail
  52.  tmsg * WIN3.1 out
  53.  c:
  54.  :
  55.  :      Flush buffers
  56.  smartdrv /c
  57.  :
  58.  :      Remove env. variables
  59.  set winpmt=
  60.  set _p_=
  61.  :
  62.  :      For the fun of it...
  63.  cookie
  64.  :
  65.  :      Show some of the options the user has
  66.  call options
  67.  :
  68.  :      Restore paths to before we started
  69.  call %temp%\winreset
  70.  goto end
  71.  
  72. :nocando
  73.  echo You're already running Windows!
  74.  bu w 3
  75.  
  76. :end
  77.