zoukankan      html  css  js  c++  java
  • 卸载ocs

    卸载客户端(毕竟占用一些网络带宽,360把它列为高危,奶奶的真烦人,客户端人比较不爽)

    1. 直接卸载

    2. 通过域策略卸载

    卸载脚本内容如下uninstall_agent.bat

    -----------------------------------------------------------------------------------------

    rem File uninstall_agent.cmd

    rem Untested on W9X (command.com) - please run with cmd.exe

    rem To only remove service:

    rem sc.exe delete "OCS INVENTORY"

    rem On Windows 2000 use delsrv.exe instead of sc.exe

    %SystemDrive%

    cd "%ProgramFiles%"

    if not exist "OCS Inventory Agent" goto end

    cd "OCS Inventory Agent"

    if exist uninst.exe call uninst.exe /S

    del *.* /s /q

    cd ..

    rd "OCS Inventory Agent" /s /q

    :end

    cd /

    因为权限的关系 直接调用以上脚本还不行

    可以利用autoit提升权限调用uninstall_agent.bat 达到卸载的目的

    Autoit 脚本内容如下uninstall_agent.au3

    Local $pid = RunAsWait( "administrator", "mdbq", "13451971056", 0, "//192.168.0.11/soft/uninstall_agent.bat" , @ScriptDir )

    ProcessWaitClose($pid)

    然后配合域策略使用达到卸载

    clip_image022

    clip_image024

    俺的简单办法:

    @echo off

    set log=ocs_agent_uninstall.txt

    echo 脚本执行时间: %date% %time% > %log%

    echo ----------------------------------------- >> %log%
    ::%%i -> ServerName
    FOR /f "eol=; skip=1 tokens=1,2" %%i IN (ip.txt) DO (

    echo.
    echo ================================================
    echo Host [%%i]
    echo Host [%%i] >> %log%
    d:xbqpsexec.exe \%%i cmd /c "C:Program Files (x86)OCS Inventory Agentuninst.exe" /s>> %log%
    echo ================================================ >> %log%
    )

  • 相关阅读:
    DB2
    Data Queue
    QMQY
    CMD(SA400 Command)
    Software development process
    CSS display样式
    CSS行高line-height解释
    CS和CS3知识点
    HTML图片<img>标签空白解决方法
    CS清除浮动
  • 原文地址:https://www.cnblogs.com/viento/p/3368674.html
Copyright © 2011-2022 走看看