安装程序 [英] installing programs

查看:87
本文介绍了安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个非常愚蠢的问题,但我仍然不完全理解,并希望有人在这里为我填补空白.

This might be a very stupid question, but I still dont completely understand and had some hope thats someone here could fill in the blanks for me.

我已经有一段时间从事编程工作了.并创建了一些简单的程序.没什么特别的,没什么大的.但是,当您从Internet下载某些内容时,通常会获得安装文件,该文件将安装您下载的程序.我不明白这是为了的.我用delphi创建了一个小型应用程序,它确实保存文件,而不是很大的文件.这些是用户不想在文件夹中查找的文件类型,您不会将其保存在某个位置.我想知道如何创建一个程序,在其中创建一个文件夹,比如说程序文件,并始终将其中的内容保存在那里.也从那里加载. application.exe也将在那里,并且在您安装它时,它会为该应用程序放置一个快捷方式.

I have been playing around with programming for sometime now. And created some simple programs. nothing special nothing big. but when you download something from the internet you normally get an instalation file which installs the program you download. What I don't understand that is for. I have created a small application with delp which does save files, not very big ones. These are types of files that the user is not going to go looking for in a folder, you don't save it in a location. I was wondering how I could create a program that makes a folder in lets say program files and always saves the things there. Loading from there as well. The application.exe will be there as well and when you install it, it places a shortcut to the application.

使用delphi可能吗?

is this possible with delphi?

推荐答案

使用Delphi编写您自己的安装程序当然是可能的,但是这样做是非常不寻常的.

It would certainly be possible write your own installation program with Delp but it would be very unusual to do so.

标准做法是使用第三方工具生成安装程序.大多数现代Windows程序都以.msi的形式出现,这是Windows Installer数据库.

Standard practice is to use a 3rd party tool to generate an installation program. Most modern Windows programs come in the form of an .msi which is a Windows Installer database.

有许多用于创建安装程序的工具:

There are many tools for creating installation programs:

  • InstallShield
  • InstallAware
  • NSIS
  • WiX
  • 明智
  • InnoSetup

您还谈到了编写和读取程序配置文件.您需要注意这些放置的位置.您不应将它们放在Program Files目录下,因为Windows的现代版本不允许用户写入这些文件夹.这就是为什么您习惯在安装软件时看到UAC对话框的原因-它们需要获得提升的权限才能进行安装.

You also talk about writing and reading program configuration files. You need to be careful about where these are placed. You should not put them under the Program Files directory because modern versions of Windows do not permit users to write to those folders. This is why you are used to seeing UAC dialogs when you install software – they need to gain elevated rights in order to install.

相反,您应该将程序配置文件保存在为此情况而设计的各种可能位置之一中,例如,

Instead you should save program configuration files in one of the assortment of possible locations designed for just this situation, for example, the CSIDL_COMMON_APPDATA folder.

这篇关于安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆