多媒体工具 Unity设置软件开机自启

 该脚本会自动在桌面 及自启文件夹 设置快捷方式,不用担心覆盖等问题 

Dll 链接:

https://download.csdn.net/download/qq_39097425/87785470

using System;
using System.IO;
using UnityEngine;

public class MonkeyAutoStartUp : MonoBehaviour
{
    private static string ShortcutName = "KY.lnk";

    private void Start()
    {
        print("Desktop " + Environment.GetFolderPath(Environment.SpecialFolder.Desktop));
#if !UNITY_EDITOR
            CheckLinkExist();
            SetStartupLink();
#endif
    }

    private void SetStartupLink()
    {
        CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.Startup), ShortcutName, System.Diagnostics.Process.GetCurrentProcess().M

猜你喜欢

转载自blog.csdn.net/qq_39097425/article/details/128340522