zoukankan      html  css  js  c++  java
  • 如何编程创建快捷方式?

    如果希望在C#里面创建快捷方式,大致可以参考下面的步骤

    1. 添加对Windows Script Host Object Model的引用

    image

    2. 编写如下代码即可

    using IWshRuntimeLibrary;
    namespace CreateShortCutdemo
    {
        class Program
        {
            static void Main(string[] args)
            {
                WshShell shell = new WshShell();
                WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(@"E:\Temp\Test.lnk");
                shortcut.TargetPath = @"E:\Temp\Play.htm";
                shortcut.Save();
            }
        }
    }

  • 相关阅读:
    百度搜索技巧
    phpstorm知识点
    A-Z
    边框
    display
    布局
    盒模型
    浮动
    字体与图标
    pselect 问题
  • 原文地址:https://www.cnblogs.com/chenxizhang/p/1257835.html
Copyright © 2011-2022 走看看