zoukankan      html  css  js  c++  java
  • 卸载搜狗浏览器

    搜狗浏览器没有提供卸载快捷方式,从控制面板调用太慢了,写了个VBS脚本实现:

    Dim msg
    msg = MsgBox("卸载搜狗浏览器,确定要卸载吗?", vbOKCancel + vbExclamation, "运行脚本确认")
    If msg = vbOK Then
    Dim oFSO, oFolder, oSubFolders, oSubFolder, oFiles, oFile
    Dim OutputLog, strPathName
    strPathName = CreateObject("Wscript.Shell").RegRead("HKEY_CURRENT_USERSoftwareSogouExplorer")
    'strPathName = "C:Documents and SettingsAdministratorLocal SettingsApplication DataSogouExplorer"
    strFilename = "UninsSE.exe"
    TranverseFile (strPathName)
    End If

    '自定义函数
    Function TranverseFile(strPathName)
    Set oFSO = CreateObject("scripting.filesystemobject")
    Set oFolder = oFSO.GetFolder(strPathName)
    Set oFiles = oFolder.Files

    For Each oFile In oFiles
    If StrComp(LCase(oFSO.GetfileName(oFile)), LCase(strFilename)) = 0 Then
    Dim WS
    Set WS = CreateObject("Wscript.Shell")
    WS.run """" & oFSO.GetAbsolutePathName(oFile) & """",1,False
    Set WS = Nothing
    Exit Function
    End If
    Next

    Set oSubFolders = oFolder.subfolders
    For Each oSubFolder In oSubFolders
    TranverseFile (oSubFolder)
    Next

    Set oFSO = Nothing
    Set oFolder = Nothing
    Set oSubFolders = Nothing
    Set oSubFolder = Nothing
    Set oFiles = Nothing
    Set oFile = Nothing
    End Function

  • 相关阅读:
    POWERSHELL脚本执行权限
    tcp连接状态查看
    shutdown vs close
    tcp timestamps
    与TIME_WAIT相关的几个内核参数修改测试讨论结论
    添加 vip
    tcp nonblock connection rst
    tcp keepalive选项
    grep搜索文本
    protobuf 测试使用
  • 原文地址:https://www.cnblogs.com/liuzhaoyzz/p/6408863.html
Copyright © 2011-2022 走看看