je cherche depuis quelques semaines comment faire exécuter mon script mysql lors de l'installation de l'application que j'ai crée en c# avec inno setup. pour cela je suis passer par le fichier batch mais rien ne fonctionne si vous pouvez vraiment m'aider. merci
voici le code de mon fichier batch
@echo off "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -u root -ppassword < personne.sql;
et celui de mon fichier inno setup (.iss)
; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[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={{F143E1E6-92F5-4E63-B37D-3ACE2BEC8156} AppName=Gestion Scolarité AppVersion=1.5 ;AppVerName=Gestion Scolarité 1.5 AppPublisher=KNYP, Inc. AppPublisherURL=http://www.knyp.com/ AppSupportURL=http://www.knyp.com/ AppUpdatesURL=http://www.knyp.com/ DefaultDirName={pf}\Gestion Scolarité DefaultGroupName=Gestion Scolarité LicenseFile=C:\Users\Piccolo85\Documents\Word\LicenceGS.txt OutputDir=C:\Users\Piccolo85\Documents\InnoSetup OutputBaseFilename=GS SetupIconFile=C:\Users\Piccolo85\Documents\Photoshop\Personne.ico Compression=lzma SolidCompression=yes WizardImageFile=C:\Users\Piccolo85\Documents\Photoshop\Bitmap.bmp WizardSmallImageFile=C:\Users\Piccolo85\Documents\Photoshop\IconeGsBpm.bmp
[Code] function VerifierFramework(): Boolean; var ErrorCode: Integer; NetFrameWorkInstalled : Boolean; Result1 : Boolean; SP2Installed : Boolean; Result2 : Boolean; Test : String; begin NetFrameWorkInstalled := fileExists('C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe'); if NetFrameWorkInstalled then begin Result := true; end else begin Result1 := MsgBox('L''application requiert le .NET Framework v4.0.30319. Or, vous ne le possédez pas sur votre ordinateur. Voulez vous l''installer maintenant et relancer cette installation ensuite ? (il est obligatoire au fonctionnement de l''application...)', mbConfirmation, MB_YESNO) = idYes; if Result1 =false then begin Result:=false; end else begin ShellExec('open', ExpandConstant('{app}\dotNetFx40_Full_x86_x64.exe'), '','',SW_SHOWNORMAL,ewNoWait,ErrorCode); end; end; end;
procedure CurStepChanged(CurStep: TSetupStep); begin if(CurStep=ssPostInstall) then begin VerifierFramework(); end; end;
executer un script mysql dans inno setup
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.