如何使用Inno Setup创建用户桌面的安装默认路径

时间:2017-05-29 19:50:51

标签: inno-setup

我使用Inno设置为我的程序安装 我想知道,默认情况下如何将程序安装在用户桌面上?

我想通了,我需要使用DefaultDirName=

我需要知道,安装在用户桌面上的内容是默认的。

有任何帮助吗?

1 个答案:

答案 0 :(得分:2)

使用{userdesktop} constant

<!DOCTYPE html>
<html>
    <head>
        <script>
    function demonstrate()
    {
        function InnerHTMLReference(reference)
        {
            this.reference = reference
        }
        InnerHTMLReference.prototype.toString = function()
        {
            return this.reference.innerHTML
        }
        function node()
        {
            return document.createElement("div")
        }
        var
            root = node(),
            first = node(), 
            second = node(),
            echo = node();
        body.appendChild(root);
        root.appendChild(first);
        root.appendChild(second);
        echo.innerHTML = "Is there an echo in here?";
        first.innerHTML = new InnerHTMLReference(echo);
        second.innerHTML = new InnerHTMLReference(echo);
        echo.innerHTML = "Not a chance.";
        var
            constructor = second.innerHTML.constructor.name;
    /*
        Suprise! 
    */
        if(constructor != "InnerHTMLReference")
            alert("Sorry: " + constructor + " != InnerHTMLReference");
    }
        </script>
    </head>
    <body onload = "demonstrate()"/>
</html>

您也可以考虑将PrivilegesRequired设置为[Setup] DefaultDirName={userdesktop} ,因为您可能不需要安装程序以管理员权限运行。

lowest
相关问题