40 lines
2 KiB
AutoIt
40 lines
2 KiB
AutoIt
|
#RequireAdmin
|
||
|
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
|
||
|
#AutoIt3Wrapper_Icon=ModernPowerLogov2.ico
|
||
|
#AutoIt3Wrapper_Outfile_x64=..\..\Logiciels\Setup.exe
|
||
|
#AutoIt3Wrapper_Res_Comment=Modern Power
|
||
|
#AutoIt3Wrapper_Res_Description=Modern Power
|
||
|
#AutoIt3Wrapper_Res_Fileversion=2.0.0.26
|
||
|
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
|
||
|
#AutoIt3Wrapper_Res_ProductName=Modern Power v2
|
||
|
#AutoIt3Wrapper_Res_ProductVersion=2.0.0.0
|
||
|
#AutoIt3Wrapper_Res_CompanyName=Tyleo Softwares
|
||
|
#AutoIt3Wrapper_Res_LegalCopyright=Tyleo Softwares
|
||
|
#AutoIt3Wrapper_Res_LegalTradeMarks=Tyleo Softwares
|
||
|
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
|
||
|
#include <ButtonConstants.au3>
|
||
|
#include <GUIConstantsEx.au3>
|
||
|
#include "TyleoAboutMe.au3"
|
||
|
#include "MetroGUI-UDF\MetroGUI_UDF.au3"
|
||
|
#include <WindowsConstants.au3>
|
||
|
|
||
|
$InstallVer = FileGetVersion(@ScriptDir & "\ModernPower.exe")
|
||
|
$InstallDir = @ProgramFilesDir & "\ModernPower"
|
||
|
$InstalledBin = $InstallDir & "\ModernPower.exe"
|
||
|
|
||
|
If FileExists(@ScriptDir & "\ModernPower.exe") Then
|
||
|
$Confirm = _Metro_MsgBox(4,"MODERN POWER SETUP","Click Yes to Install Modern Power." & @CRLF & "Setup will use the existing version in the same folder of the setup executable." & @CRLF & " " & @CRLF & "Version : " & $InstallVer)
|
||
|
If $Confirm = "Yes" Then
|
||
|
DirCreate($InstallDir)
|
||
|
FileDelete($InstallDir & "\ModernPower.exe")
|
||
|
FileCopy(@ScriptDir & "\ModernPower.exe",$InstallDir)
|
||
|
FileCreateShortcut($InstallDir & "\ModernPower.exe", @DesktopCommonDir & "\Modern Power")
|
||
|
FileCreateShortcut($InstallDir & "\ModernPower.exe", @StartMenuCommonDir & "\Modern Power")
|
||
|
$fr_Confirm = _Metro_MsgBox(4,"FRENCH PATCH","Do you want to install French Lang Patch ?" & @CRLF & "Voulez-vous installer le patch Français ?")
|
||
|
if $fr_Confirm = "Yes" Then
|
||
|
FileWrite($InstallDir & "\fr","FrenchPatch")
|
||
|
EndIf
|
||
|
EndIf
|
||
|
Else
|
||
|
_Metro_MsgBox(0+16,"ERROR","No Ressource 'ModernPower.exe' found. Exiting.")
|
||
|
EndIf
|