Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for netsetfr.bat

(view source code of netsetfr.bat as plain text)

  1. @ECHO OFF
  2. REM Stores computername, user ID and Workgroup in environment
  3. REM variables COMPUTERNAME, USERNAME and WORKGROUP in Windows
  4. REM 98's master environment.
  5. REM Uses WINSET, which must be located somewhere in the PATH.
  6. REM This batch file is adapted for French Windows 98 versions.
  7.  
  8. NET CONFIG | FIND /I "Nom d'ordinateur" > %TEMP%.\NETCONF$.BAT
  9. ECHO > NOM.BAT WINSET COMPUTERNAME=%%2
  10. CALL %TEMP%.\NETCONF$.BAT
  11.  
  12. NET CONFIG | FIND /I "Nom d'utilisateur" > %TEMP%.\NETCONF$.BAT
  13. ECHO > NOM.BAT WINSET USERNAME=%%2
  14. CALL %TEMP%.\NETCONF$.BAT
  15.  
  16. NET CONFIG | FIND /I "Groupe de travail" > %TEMP%.\NETCONF$.BAT
  17. ECHO > GROUPE.BAT WINSET WORKGROUP=%%3
  18. CALL %TEMP%.\NETCONF$.BAT
  19.  
  20. DEL NOM.BAT
  21. DEL GROUPE.BAT
  22. DEL %TEMP%.\NETCONF$.BAT
  23.  

page last uploaded: 2017-08-21, 14:26