Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set user=%USERNAME%
- call "%~dp0log" %~nx0: ==============================================
- call "%~dp0log" %~nx0: Konfiguracja nazw dla użytkownika: %user%
- call "%~dp0log" %~nx0: ==============================================
- echo ==============================================
- echo Konfiguracja nazw dla użytkownika: %user%
- echo ==============================================
- SET /P PCNAME=Nazwa komputera:
- SET /P PCGROUP=Grupa robocza:
- wmic computersystem where name="%computername%" call rename name="%PCNAME%" | find "ReturnValue = 0;"
- echo %errorlevel%
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono nazwe komputera na: %PCNAME% )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem nazwy komputera na: %PCNAME% )
- reg add "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v SrvComment /t REG_SZ /d "%PCNAME%" >nul
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono opis komputera na: %PCNAME% )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem opisu komputera na: %PCNAME% )
- reg query "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /v SrvComment | find /i "SrvComment"| "%~dp0log" /fifo %~nx0: 2>nul
- Wmic computersystem where name="%computername%" call joindomainorworkgroup name="%PCGROUP%" | find "ReturnValue = 0;"
- echo %errorlevel%
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono grupe robocza na: %PCGROUP% )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem grupy roboczej na: %PCGROUP% )
- LABEL c: System
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono nazwę dysku c: jako System )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem nazwy dysku c: )
- LABEL d: Dane
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono nazwę dysku d: jako Dane )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem nazwy dysku d: )
- LABEL e: Dane
- if not errorlevel 1 ( call "%~dp0log" %~nx0: ustawiono nazwę dysku e: jako Dane )
- if errorlevel 1 ( call "%~dp0log" %~nx0: problem z ustawieniem nazwy dysku e: )
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement