zoukankan      html  css  js  c++  java
  • 批处理文件 自动修改计算机名

    @echo off  
    echo     修改计算机器名... 
    set pcname=WinXP-%random:~-3% 
    echo Windows Registry Editor Version 5.00>ComputerName.reg 
    echo [HKEY_CURRENT_USERSoftwareMicrosoftWindowsShellNoRoam]>>ComputerName.reg 
    echo @="%pcname%">>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlComputerName]>>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlComputerNameComputerName]>>ComputerName.reg 
    echo "ComputerName"="%pcname%">>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlComputerNameActiveComputerName]>>ComputerName.reg 
    echo "ComputerName"="%pcname%">>c:TempInfo.reg>>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventlog]>>ComputerName.reg 
    echo "ComputerName"="%pcname%">>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlComputerNameComputerName]>>ComputerName.reg 
    echo "ComputerName"="%pcname%">>ComputerName.reg 
    echo [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters]>>ComputerName.reg 
    echo "NV Hostname"="%pcname%">>ComputerName.reg 
    echo "Hostname"="%pcname%">>ComputerName.reg 
    echo [HKEY_USERS.DEFAULTSoftwareMicrosoftWindowsShellNoRoam]>>ComputerName.reg 
    echo @="%pcname%">>ComputerName.reg 
    regedit /s ComputerName.reg 
    del /q ComputerName.reg 
    echo     修改计算机器名称完成... 
    del %0 
  • 相关阅读:
    数据库设计
    Java各类格式转换
    Linux下如何查看tomcat是否启动/系统日志等
    string去空格
    Tomcat
    linux下的显示有中国农历的日历ccal
    Linux命令
    JSP学习-02隐式对象
    jQuery 遍历
    jQuery 隐藏效果
  • 原文地址:https://www.cnblogs.com/webcyz/p/3974688.html
Copyright © 2011-2022 走看看