.net 将提取并运行文件的自提取器

.net 将提取并运行文件的自提取器,.net,exe,self-extracting,.net,Exe,Self Extracting,我有两个文件,一个EXE文件和一个DLL文件 exe是一个vb.net应用程序的构建,我也需要其中的DLL 我想要的是一个自解释器,它将把这些文件放在一起,然后在运行时,它将提取它们并立即运行EXE 是否有一个非常简单和易于使用的开箱即用软件可以做到这一点?无论是否商业化,都无所谓。您可以尝试。您可以使用(免费和开源)。它非常灵活,但也可以用于如此简单的任务(在这种情况下,它对我很有用)。假设文件名为yourapp.exe和yourlib.dll,则可以使用以下脚本: # this will b

我有两个文件,一个EXE文件和一个DLL文件

exe是一个vb.net应用程序的构建,我也需要其中的DLL

我想要的是一个自解释器,它将把这些文件放在一起,然后在运行时,它将提取它们并立即运行EXE

是否有一个非常简单和易于使用的开箱即用软件可以做到这一点?无论是否商业化,都无所谓。

您可以尝试。

您可以使用(免费和开源)。它非常灵活,但也可以用于如此简单的任务(在这种情况下,它对我很有用)。假设文件名为
yourapp.exe
yourlib.dll
,则可以使用以下脚本:

# this will be the created executable archive
OutFile "archive.exe"
# define the directory to install to, the installer's directory in this case 
InstallDir $EXEDIR

# don't create a window for the unarchiver
# You could get fancy and do all kinds of configuration 
#   in the non-silent install; this example is the simplest it can be.
SilentInstall silent

# the executable part
Section

# define the output path for the following files
SetOutPath $INSTDIR
# define what to install and place it in the output path...
# ...your app...
File yourapp.exe
# ...and the library.
File yourlib.dll

# run your application
ExecShell yourapp.exe

# done
SectionEnd
安装NSIS,将此脚本创建为
archive.nsi
,右键单击它并选择“使用NSIS编译”。将创建文件
archive.exe

然后,在目标系统上,用户只需启动
archive.exe
;脚本将解包并运行您的程序

(如果您想喜欢,可以查看随NSIS安装的教程,或。)