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

  • 相关阅读:
    尽管以C++为基础,但 Java 是一种更纯粹的面向对象程序设计语言
    Java 还是 C++?
    计划的回报
    阶段4:校订
    阶段3:开始创建
    阶段2:如何构建?
    阶段1:要制作什么?
    阶段0:拟出一个计划
    不要迷失
    分析和设计
  • 原文地址:https://www.cnblogs.com/liuzhaoyzz/p/6408863.html
Copyright © 2011-2022 走看看