Make an installer for a program that appears in programs and features, creates desktop shortcuts, and can update

时间:2015-07-29 00:20:30

标签: installer exe

I have an executable file that I have me and all my friends use. Every time I update it they have to re-download it and move it to the correct location and update the shortcut and etc. I want to make an installer that will create a shortcut for the program on the desktop and/or start menu, add it to the programs and features list with an option to uninstall it, and to update off of a file (or files) off of my website. I can't find and program that can do all of this.

P.S. The program is written in AutoHotKey and all my friends are running windows.

1 个答案:

答案 0 :(得分:0)

您可以在AutoHotkey中构建自己的启动器/安装程序/更新程序。这不是一件容易的事,但它是可行的。以下是我认为您希望编写的程序的快速概述。许多程序员用伪代码写出他们的问题,将大问题分解成更小的部分。我没有时间为您编写完整的解决方案,但这可能会帮助您入门:

伪代码概述

Program Start: 

Check for internet connectivity function() 
    If no Internet Skip Updater / Installer Functions Going straight to launcher

Check for .ini or Registry Entries (Where you store your installation info)
    if Information Exists and no Internet MsgBox, "Cannot install"
    Else if internet = True
        Function Installer()


Launcher: 
    Run App

Updater:
    Download Text info with MD5 Checksums
    Compare MD5 checksums to installed files
    If file different 
        function Installer(file)

Installer(file) 
    Download File
    Copy file to appropriate Directory
    Update ini or registry with MD5 of files

Md5(file, Info)
    If File = Info
        Continue

Uninstall: 
    Delete Programs / Files / Remove Directories etc

以下是一些可以帮助您入门的功能。

检查互联网状态:

connectedToInternet(flag=0x40) { ; Returns True or False
Return DllCall("Wininet.dll\InternetGetConnectedState", "Str", flag,"Int",0)
}

用法:

If !connectedToInternet() {
        curstatus = False
    }
    Else {
        curstatus = True
    }

URLDownloadToFiles

MD5 Checksum

祝你好运。