zoukankan      html  css  js  c++  java
  • vbs学习笔记2——创建桌面快捷方式

    脚本

    Set WshShell = WScript.CreateObject("WScript.Shell")
    strDesktop = WshShell.SpecialFolders("Desktop")
    set oShellLink = WshShell.CreateShortcut(strDesktop & "xxx系统.lnk")
    
    Dim fso
    Set fso=CreateObject("Scripting.FileSystemObject")        
    If fso.folderExists("C:\Program Files (x86)") Then '通过目录来判断是32位还是64位操作系统        
        oShellLink.TargetPath = "C:Program Files (x86)GoogleChromeApplicationchrome.exe" '目标
        oShellLink.WorkingDirectory = "C:Program Files (x86)GoogleChromeApplication" '起始位置
    Else 
        oShellLink.TargetPath = "C:Program FilesGoogleChromeApplicationchrome.exe" 
        oShellLink.WorkingDirectory = "C:Program FilesGoogleChromeApplication"     
    End If
    oShellLink.Arguments = "http://192.168.0.1:8080/xxx/" '运行参数
    oShellLink.WindowStyle = 1 '参数1默认窗口激活,参数3最大化激活,参数7最小化
    oShellLink.Hotkey = "" '快捷键
    oShellLink.IconLocation = "C:Program FilesChromeStandaloneSetupfavicon.ico" '图标
    oShellLink.Description = "" 
    oShellLink.Save '创建保存快捷方式
  • 相关阅读:
    构建之法阅读笔记04
    构建之法阅读笔记03
    第十二周学习进度情况
    课堂练习-找水王
    第十一周学习进度情况
    第十周学习进度情况
    课后作业:寻找水王
    《人月神话》阅读笔记01
    学习进度条
    学习进度条
  • 原文地址:https://www.cnblogs.com/xwdreamer/p/3509734.html
Copyright © 2011-2022 走看看