inno setup net vc 环境检测 apahce php jdk mssql server 打包成安装包

2024-04-12 07:38

本文主要是介绍inno setup net vc 环境检测 apahce php jdk mssql server 打包成安装包,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 将sqlserver安装配置文件打包到setup.exe中

OutPut中所需要的文件及文件夹

 

inno setup脚本文件需要用到的文件

所有到到脚本文件

autoInstallapache.bat

@echo off
cd ..
set apacheroot=%~dp0%apache
echo %apacheroot%
cd %apacheroot% 
bin\httpd -k install
bin\httpd -k start

autoInstalljdk.bat

@echo off
cd ..
set jdkpath=%~dp0%javasdk
echo %jdkpath%
wmic ENVIRONMENT where "name='JAVA_HOME'" delete
wmic ENVIRONMENT create name="JAVA_HOME",username="<system>",VariableValue="%jdkpath%"
wmic ENVIRONMENT where "name='PATH' and username='<system>'" set VariableValue="%PATH%;%%JAVA_HOME%%\bin;%%JAVA_HOME%%\jre\bin;"

autoUnInstallapache.bat

 

@echo off
cd ..
set apacheroot=%~dp0%apache
echo %apacheroot%
cd %apacheroot% 
bin\httpd -k stop
bin\httpd -k uninstall

 

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!#define MyAppName "平台"
#define MyAppVersion "1.0"
#define MyAppPublisher "责任公司"
#define MyAppURL "http://www.aaa.com"[Languages]
Name: "chs"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{60A75221-BCC5-447F-B69D-F12EFD3DCAA3}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\myprograme
DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
LicenseFile=LICENSE.txt
AlwaysRestart=yes[Files]
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "{src}\apache\*"; DestDir: "{app}\apache";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\php\*"; DestDir: "{app}\php";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\javasdk\*"; DestDir: "{app}\javasdk";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\msodbcsql.msi"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\vc_redist.x64.exe"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\autoInstallapache.bat"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\autoInstalljdk.bat"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\autoUnInstallapache.bat"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "{src}\www\*"; DestDir: "{app}\www";Flags: external igNoreversion recursesubdirs createallsubdirs
Source: "ConfigurationFile_simple.ini";Flags: dontcopy noencryption
Source: "{src}\sqlserverdata\*"; DestDir: "{app}";Flags: external igNoreversion recursesubdirs createallsubdirs[Run]
Filename: "{src}\sqlserver_2012_xpr_x64_sp1\SETUP.EXE"; Parameters: "/ConfigurationFile={tmp}\ConfigurationFile_simple.ini"; Description: "sqlserver";Flags: waituntilterminated
Filename: "{app}\msodbcsql.msi"; Parameters: "/qb IACCEPTMSODBCSQLLICENSETERMS=YES"; Description: "msodbcsql"; Flags:shellexec waituntilterminated;设置java环境变量
Filename: "{app}\autoInstalljdk.bat";Flags: runascurrentuser waituntilterminated    [Code]
var
CheckNetEvnPageID:Integer;//CheckNetEvnPage的PageID
//CheckNetEvnPageBtnInstall:Tbutton;//安装net46按钮
CheckNetEvnPageDotNetLbl:TLabel; //显示DotNet是否安装标签
CheckNetEvnPageVC14x64NetLbl:TLabel; //显示DotNet是否安装标签
InstalledShowInfoPageID:Integer;//*****************************************************************************************************
//net环境检察函数
function IsDotNetDetected(version: string; service: cardinal): boolean;
// Indicates whether the specified version and service pack of the .NET Framework is installed.
//
// version -- Specify one of these strings for the required .NET Framework version:
//    'v1.1'          .NET Framework 1.1
//    'v2.0'          .NET Framework 2.0
//    'v3.0'          .NET Framework 3.0
//    'v3.5'          .NET Framework 3.5
//    'v4\Client'     .NET Framework 4.0 Client Profile
//    'v4\Full'       .NET Framework 4.0 Full Installation
//    'v4.5'          .NET Framework 4.5
//    'v4.5.1'        .NET Framework 4.5.1
//    'v4.5.2'        .NET Framework 4.5.2
//    'v4.6'          .NET Framework 4.6
//    'v4.6.1'        .NET Framework 4.6.1
//    'v4.6.2'        .NET Framework 4.6.2
//
// service -- Specify any non-negative integer for the required service pack level:
//    0               No service packs required
//    1, 2, etc.      Service pack 1, 2, etc. required
varkey, versionKey: string;install, release, serviceCount, versionRelease: cardinal;success: boolean;
beginversionKey := version;versionRelease := 0;// .NET 1.1 and 2.0 embed release number in version keyif version = 'v1.1' then beginversionKey := 'v1.1.4322';end else if version = 'v2.0' then beginversionKey := 'v2.0.50727';end// .NET 4.5 and newer install as update to .NET 4.0 Fullelse if Pos('v4.', version) = 1 then beginversionKey := 'v4\Full';case version of'v4.5':   versionRelease := 378389;'v4.5.1': versionRelease := 378675; // 378758 on Windows 8 and older'v4.5.2': versionRelease := 379893;'v4.6':   versionRelease := 393295; // 393297 on Windows 8.1 and older'v4.6.1': versionRelease := 394254; // 394271 on Windows 8.1 and older'v4.6.2': versionRelease := 394802; // 394806 on Windows 8.1 and olderend;end;// installation key group for all .NET versionskey := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + versionKey;// .NET 3.0 uses value InstallSuccess in subkey Setupif Pos('v3.0', version) = 1 then beginsuccess := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install);end else beginsuccess := RegQueryDWordValue(HKLM, key, 'Install', install);end;// .NET 4.0 and newer use value Servicing instead of SPif Pos('v4', version) = 1 then beginsuccess := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount);end else beginsuccess := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount);end;// .NET 4.5 and newer use additional value Releaseif versionRelease > 0 then beginsuccess := success and RegQueryDWordValue(HKLM, key, 'Release', release);success := success and (release >= versionRelease);end;result := success and (install = 1) and (serviceCount >= service);
end;
//*****************************************************************************************************//*****检测vc环境方法**************
function IsVc14x64Detected():boolean;
var
str,CurVer:string;
beginRegQueryStringValue(HKLM, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Version', CurVer);str := Copy(CurVer,2,2);log(str);if str = '14' thenbeginResult := true;end else beginResult := false;end;  
end;
//*****检测vc环境方法**************//****************安装VC14X64方法***********************************************
procedure InstallVc14X64;
var srcpath:string;
ResultCode:Integer;
begin//同安装setup同目录下的文件{src}srcpath :=  ExpandConstant('{src}\vc_redist.x64.exe');Exec(srcpath, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
//****************安装VC14X64方法***********************************************procedure CheckNetEvnPageBtnVcInstallOnClick(Sender:TObject);
var
vc46installpackpath:string;
begin
vc46installpackpath:=ExpandConstant('{src}\vc_redist.x64.exe');if NOT  IsVc14x64Detected then beginif FileExists(vc46installpackpath) then begin//MsgBox('文件存在', mbInformation, MB_OK);InstallVc14X64;//调用安装InstallVc14X64方法。 end else   MsgBox(vc46installpackpath +'文件不存在。', mbInformation, MB_OK);end elseMsgBox('系统已安装VC14X64环境,不需要安装', mbInformation, MB_OK);
end;//**安装DotNet46方法************************
procedure InstallDotNet46;
var
srcpath:string;
ResultCode:Integer;
begin//同安装setup同目录下的文件{src}srcpath :=  ExpandConstant('{src}\NDP46-KB3045557-x86-x64-AllOS-ENU.exe');Exec(srcpath, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);log(srcpath);
end;
//**安装DotNet46方法************************//**************
procedure CheckNetEvnPageBtnInstallOnclick(Sender:TObject);
beginif NOT  IsDotNetDetected('v4.6',0)  then beginMsgBox('没有安装net46环境', mbInformation, MB_OK);end elseMsgBox('系统已安装net46环境', mbInformation, MB_OK);
end;//***************************************************************************************procedure InstallDotNet46ButtonOnClick(Sender:TObject);
var
net46installpackpath:string;
begin
net46installpackpath :=  ExpandConstant('{src}\NDP46-KB3045557-x86-x64-AllOS-ENU.exe');if NOT  IsDotNetDetected('v4.6',0) then beginif FileExists(net46installpackpath) then begin//MsgBox('文件存在', mbInformation, MB_OK);InstallDotNet46;//调用安装DotNet46方法。 end else   MsgBox(net46installpackpath +'文件不存在。', mbInformation, MB_OK);end elseMsgBox('系统已安装net46环境,不需要安装', mbInformation, MB_OK);
end;procedure CheckNetEvnPageBtnVcCheckOnClick(Sender:TObject);
beginif NOT   IsVc14x64Detected     then beginMsgBox('vc14x64没有安装', mbInformation, MB_OK);end elseMsgBox('vc14x64已安装', mbInformation, MB_OK);
end;//*******************AboutButtonOnClick****************************************
procedure AboutButtonOnClick(Sender: TObject);
beginMsgBox('华远智能信息发布系统V1.0。', mbInformation, mb_Ok);
end;
//*******************AboutButtonOnClick****************************************//*********创建自定义向导页面**************************************************
procedure CreateTheWizardPages;
var
CheckNetEvnPage:TwizardPage;//net环境检测页面
CheckNetEvnPageBtn:Tbutton;//检查按钮
CheckNetEvnPageBtnInstall:Tbutton;//安装net46按钮CheckNetEvnPageBtnVcInstall:Tbutton;//安装vc环境按钮InstalledShowInfoPage:TwizardPage;
InstalledShowInfoPageLbl1:Tlabel;//请使用谷歌浏览器登录
InstalledShowInfoPageLbl2:Tlabel;//http://localhost:18080
InstalledShowInfoPageLbl3:Tlabel;//用户名:admin,密码:admin
InstalledShowInfoPageLbl4:Tlabel;
InstalledShowInfoPageLbl5:Tlabel;
InstalledShowInfoPageLbl6:Tlabel;CheckNetEvnPageBtnVcCheck:Tbutton;
begin{net环境检查}CheckNetEvnPage:=CreateCustomPage(wpLicense, '环境检查', '安装环境是必须的。');CheckNetEvnPageID:=CheckNetEvnPage.ID;CheckNetEvnPageDotNetLbl:=TLabel.Create(CheckNetEvnPage);CheckNetEvnPageDotNetLbl.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageDotNetLbl.Caption:='dotnet46';CheckNetEvnPageBtn:=TButton.Create(CheckNetEvnPage);CheckNetEvnPageBtn.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageBtn.Caption:='检测net环境';CheckNetEvnPageBtn.Onclick:=@CheckNetEvnPageBtnInstallOnclick;CheckNetEvnPageBtn.Top:= CheckNetEvnPageDotNetLbl.Top;CheckNetEvnPageBtn.Left:= CheckNetEvnPageDotNetLbl.Left + 200;CheckNetEvnPageBtnInstall:=TButton.Create(CheckNetEvnPage);CheckNetEvnPageBtnInstall.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageBtnInstall.Caption:='安装net环境';CheckNetEvnPageBtnInstall.Onclick:=@InstallDotNet46ButtonOnClick;CheckNetEvnPageBtnInstall.Top:= CheckNetEvnPageBtn.Top;CheckNetEvnPageBtnInstall.Left:= CheckNetEvnPageBtn.Left + 200;CheckNetEvnPageVC14x64NetLbl:=TLabel.Create(CheckNetEvnPage);CheckNetEvnPageVC14x64NetLbl.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageVC14x64NetLbl.Caption:='VC16X64';CheckNetEvnPageVC14x64NetLbl.Top:= CheckNetEvnPageDotNetLbl.Top + 40;CheckNetEvnPageBtnVcCheck:=TButton.Create(CheckNetEvnPage);CheckNetEvnPageBtnVcCheck.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageBtnVcCheck.Caption:='检测vc环境';CheckNetEvnPageBtnVcCheck.Onclick:=@CheckNetEvnPageBtnVcCheckOnClick;CheckNetEvnPageBtnVcCheck.Top:= CheckNetEvnPageBtn.Top + 40;CheckNetEvnPageBtnVcCheck.Left:= CheckNetEvnPageBtn.Left CheckNetEvnPageBtnVcInstall:=TButton.Create(CheckNetEvnPage);CheckNetEvnPageBtnVcInstall.Parent:=CheckNetEvnPage.Surface;CheckNetEvnPageBtnVcInstall.Caption:='安装vc环境';CheckNetEvnPageBtnVcInstall.Onclick:=@CheckNetEvnPageBtnVcInstallOnClick;CheckNetEvnPageBtnVcInstall.Top:= CheckNetEvnPageBtn.Top + 40;CheckNetEvnPageBtnVcInstall.Left:= CheckNetEvnPageBtn.Left + 200 {安装完显示信息}InstalledShowInfoPage:=CreateCustomPage(wpInstalling, '安装完成', '已安装成功,请详细阅读操作手册。');//InstalledShowInfoPage:=CreateCustomPage(CheckNetEvnPageID, '安装完成', '已安装成功,请详细阅读操作手册。');InstalledShowInfoPageID:=InstalledShowInfoPage.ID;InstalledShowInfoPageLbl1:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl1.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl1.Caption:='请使用谷歌浏览器登录';InstalledShowInfoPageLbl2:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl2.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl2.Caption:='http://localhost:18080';InstalledShowInfoPageLbl2.Top:=InstalledShowInfoPageLbl1.Top;InstalledShowInfoPageLbl2.Left:=InstalledShowInfoPageLbl1.Left + 200;InstalledShowInfoPageLbl2.Font.Color:=clBlue;InstalledShowInfoPageLbl2.Font.Style:=[fsUnderline];InstalledShowInfoPageLbl3:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl3.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl3.Caption:='用户名:admin,密码:admin';InstalledShowInfoPageLbl3.Top:=InstalledShowInfoPageLbl1.Top  + 20;InstalledShowInfoPageLbl3.Left:=InstalledShowInfoPageLbl1.Left + 200;InstalledShowInfoPageLbl4:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl4.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl4.Caption:='请详细阅读:';InstalledShowInfoPageLbl4.Top:=InstalledShowInfoPageLbl1.Top  + 60;InstalledShowInfoPageLbl4.Left:=InstalledShowInfoPageLbl1.Left;InstalledShowInfoPageLbl5:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl5.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl5.Caption:='华远智能信息发布系统操作手册.pdf';InstalledShowInfoPageLbl5.Top:=InstalledShowInfoPageLbl4.Top;InstalledShowInfoPageLbl5.Left:=InstalledShowInfoPageLbl1.Left + 200;InstalledShowInfoPageLbl5.Font.Color:=clBlue;InstalledShowInfoPageLbl5.Font.Style:=[fsUnderline];InstalledShowInfoPageLbl6:=TLabel.Create(InstalledShowInfoPage);InstalledShowInfoPageLbl6.Parent:=InstalledShowInfoPage.Surface;InstalledShowInfoPageLbl6.Caption:='请记住这些关键信息,以后会经常用到。';InstalledShowInfoPageLbl6.Top:=InstalledShowInfoPageLbl5.Top + 60;InstalledShowInfoPageLbl6.Font.Color:=clRed;end;
//************创建自定义向导页面结束*********************************************** //*********点击URLLabel事件****************************************************
procedure URLLabelOnClick(Sender: TObject);
varErrorCode: Integer;
beginShellExecAsOriginalUser('open', 'http://www.hysy-it.com/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
//*********点击URLLabel事件****************************************************procedure CreateAboutButtonAndURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
varAboutButton: TNewButton;URLLabel: TNewStaticText;
beginAboutButton := TNewButton.Create(ParentForm);AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;AboutButton.Top := CancelButton.Top;AboutButton.Width := CancelButton.Width;AboutButton.Height := CancelButton.Height;AboutButton.Anchors := [akLeft, akBottom];AboutButton.Caption := '&关于...';AboutButton.OnClick := @AboutButtonOnClick;AboutButton.Parent := ParentForm;URLLabel := TNewStaticText.Create(ParentForm);URLLabel.Caption := 'www.hysy-it.com';URLLabel.Cursor := crHand;URLLabel.OnClick := @URLLabelOnClick;URLLabel.Parent := ParentForm;{ Alter Font *after* setting Parent so the correct defaults are inherited first }URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];URLLabel.Font.Color := clHotLightURLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);URLLabel.Anchors := [akLeft, akBottom];
end;
//**************************CreateAboutButtonAndURLLabel*******************//***************************************************************************************
procedure InitializeWizard();
beginWizardForm.LICENSEACCEPTEDRADIO.Checked:=true;CreateTheWizardPages;CreateAboutButtonAndURLLabel(WizardForm, WizardForm.CancelButton);
end;
//***************************************************************************************procedure InitializeUninstallProgressForm();
beginCreateAboutButtonAndURLLabel(UninstallProgressForm, UninstallProgressForm.CancelButton);
end;//*****************************************************************************************
function NextButtonClick(CurPageID:Integer): Boolean;
beginif CurpageId=CheckNetEvnPageID thenbeginif not IsDotNetDetected('v4.6', 0) then beginMsgBox('系统没有net46环境,请安装net46环境。', mbInformation, MB_OK);end elseif not IsVc14x64Detected then beginMsgBox('系统没有vc14x64环境,请安装vc14x64环境。', mbInformation, MB_OK);end elseresult:=true;end elseresult:=true;
end;
//*********************************************************************************************procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begincase CurUninstallStep ofusUninstall:begin//MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall is about to start.', mbInformation, MB_OK)// ...insert code to perform pre-uninstall tasks here...end;usPostUninstall:begin//MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK);// ...insert code to perform post-uninstall tasks here...end;end;
end;//**********************************************************
//文件内容替换方法
//    SrcFIle:文件路径   
//    sFrom:源字符
//    STo: 填的的字符
procedure FileReplace(SrcFile, sFrom, sTo: String);
varUnicodeStr:String;FileContent: AnsiString;
begin//Load srcfile to a stringLoadStringFromFile(SrcFile, FileContent);//Replace Fraomstring by toString in file string content//StringChange (sTo,'/', '\');UnicodeStr :=String(FileContent);StringChangeEx (UnicodeStr, sFrom, sTo,True);//Replace old content srcfile by the new contentDeleteFile(SrcFile);SaveStringToFile(SrcFile,UnicodeStr, True);
end;
//**********************************************************//************************************************************
procedure CurStepChanged(CurStep: TSetupStep);
var
fileName:String;
SRVROOTPATH:String;//apahce 工作目录
WWWPATH:String; //网站目录
PHPPATH:String; //http-php.conf
PHPINIPATH:String;//php.ini 的扩展目录
ErrorCode: Integer;beginSRVROOTPATH :=ExpandConstant('{app}\apache');WWWPATH :=ExpandConstant('{app}\www');PHPPATH:=ExpandConstant('{app}');PHPINIPATH:=ExpandConstant('{app}\php\ext');//SqlserverIni:=ExpandConstant('{app}\sqlserverdata');//复制完文件后执行if CurStep=ssPostInstall thenbeginfilename := ExpandConstant('{app}\apache\conf\httpd.conf');FileReplace(filename, '@@SRVROOT@@',SRVROOTPATH);filename := ExpandConstant('{app}\apache\conf\httpd.conf');FileReplace(filename, '@@www@@',WWWPATH);filename := ExpandConstant('{app}\apache\conf\extra\httpd-php.conf');FileReplace(filename, '@@php@@',PHPPATH);filename := ExpandConstant('{app}\php\php.ini');FileReplace(filename, '@@extensiondir@@',PHPINIPATH);end;if CurStep=ssDone   thenbeginShellExecAsOriginalUser('open', 'http://localhost:18080', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);end;end;
//****************************************************************//主要是程序调用“下一步”,然后在ShouldSkipPage函数中进行跳过。
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if PageID=wpReady thenresult := true;
end;function InitializeSetup: Boolean;
begin// Show the contents of Readme.txt (non Unicode) in a message boxExtractTemporaryFile('ConfigurationFile_simple.ini');//log(ExpandConstant('{tmp}\ConfigurationFile_simple.ini'));Result := True;
end;procedure CurPageChanged(CurPageID: Integer);
var 
SQLSERVERDATAPATH:string;
SqlInifilename:string;
ResultCode:Integer;beginif CurPageID=wpInstalling then begin//修改SQLSERVER实例安装路径SQLSERVERDATAPATH:=ExpandConstant('{app}\sqlserverdata'); SqlInifilename := ExpandConstant('{tmp}\ConfigurationFile_simple.ini');FileReplace(SqlInifilename, '@@INSTANCEDIR@@',SQLSERVERDATAPATH);end;if CurPageID=InstalledShowInfoPageID then beginExec(ExpandConstant('{app}\autoInstallapache.bat'),'','',SW_SHOW,ewWaitUntilTerminated,ResultCode);//重启apache脚本end;    
end;

 

这篇关于inno setup net vc 环境检测 apahce php jdk mssql server 打包成安装包的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/896515

相关文章

python常见环境管理工具超全解析

《python常见环境管理工具超全解析》在Python开发中,管理多个项目及其依赖项通常是一个挑战,下面:本文主要介绍python常见环境管理工具的相关资料,文中通过代码介绍的非常详细,需要的朋友... 目录1. conda2. pip3. uvuv 工具自动创建和管理环境的特点4. setup.py5.

SQL Server修改数据库名及物理数据文件名操作步骤

《SQLServer修改数据库名及物理数据文件名操作步骤》在SQLServer中重命名数据库是一个常见的操作,但需要确保用户具有足够的权限来执行此操作,:本文主要介绍SQLServer修改数据... 目录一、背景介绍二、操作步骤2.1 设置为单用户模式(断开连接)2.2 修改数据库名称2.3 查找逻辑文件名

SQL Server数据库死锁处理超详细攻略

《SQLServer数据库死锁处理超详细攻略》SQLServer作为主流数据库管理系统,在高并发场景下可能面临死锁问题,影响系统性能和稳定性,这篇文章主要给大家介绍了关于SQLServer数据库死... 目录一、引言二、查询 Sqlserver 中造成死锁的 SPID三、用内置函数查询执行信息1. sp_w

OpenCV实现实时颜色检测的示例

《OpenCV实现实时颜色检测的示例》本文主要介绍了OpenCV实现实时颜色检测的示例,通过HSV色彩空间转换和色调范围判断实现红黄绿蓝颜色检测,包含视频捕捉、区域标记、颜色分析等功能,具有一定的参考... 目录一、引言二、系统概述三、代码解析1. 导入库2. 颜色识别函数3. 主程序循环四、HSV色彩空间

Python中使用uv创建环境及原理举例详解

《Python中使用uv创建环境及原理举例详解》uv是Astral团队开发的高性能Python工具,整合包管理、虚拟环境、Python版本控制等功能,:本文主要介绍Python中使用uv创建环境及... 目录一、uv工具简介核心特点:二、安装uv1. 通过pip安装2. 通过脚本安装验证安装:配置镜像源(可

使用jenv工具管理多个JDK版本的方法步骤

《使用jenv工具管理多个JDK版本的方法步骤》jenv是一个开源的Java环境管理工具,旨在帮助开发者在同一台机器上轻松管理和切换多个Java版本,:本文主要介绍使用jenv工具管理多个JD... 目录一、jenv到底是干啥的?二、jenv的核心功能(一)管理多个Java版本(二)支持插件扩展(三)环境隔

Linux中修改Apache HTTP Server(httpd)默认端口的完整指南

《Linux中修改ApacheHTTPServer(httpd)默认端口的完整指南》ApacheHTTPServer(简称httpd)是Linux系统中最常用的Web服务器之一,本文将详细介绍如何... 目录一、修改 httpd 默认端口的步骤1. 查找 httpd 配置文件路径2. 编辑配置文件3. 保存

python获取cmd环境变量值的实现代码

《python获取cmd环境变量值的实现代码》:本文主要介绍在Python中获取命令行(cmd)环境变量的值,可以使用标准库中的os模块,需要的朋友可以参考下... 前言全局说明在执行py过程中,总要使用到系统环境变量一、说明1.1 环境:Windows 11 家庭版 24H2 26100.4061

Python程序打包exe,单文件和多文件方式

《Python程序打包exe,单文件和多文件方式》:本文主要介绍Python程序打包exe,单文件和多文件方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录python 脚本打成exe文件安装Pyinstaller准备一个ico图标打包方式一(适用于文件较少的程

pytest+allure环境搭建+自动化实践过程

《pytest+allure环境搭建+自动化实践过程》:本文主要介绍pytest+allure环境搭建+自动化实践过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录一、pytest下载安装1.1、安装pytest1.2、检测是否安装成功二、allure下载安装2.