본문 바로가기

Innosetup4

[Delphi] InnoSetup : 설치 전, 설치 후 함수 호출하기 [BeforeInstall] [Files]Source: "MYPROG.EXE"; DestDir: "{app}"; BeforeInstall: MyBeforeInstallSource: "A\MYFILE.TXT"; DestDir: "{app}"; BeforeInstall: MyBeforeInstall2('{app}\A\MYFILE.TXT') [AfterInstall] [Files]Source: "MYPROG.EXE"; DestDir: "{app}"; AfterInstall: MyAfterInstallSource: "A\MYFILE.TXT"; DestDir: "{app}"; AfterInstall: MyAfterInstall2('{app}\A\MYFILE.TXT') [Code]procedure MyBeforeI.. 2013. 8. 7.
[Delphi] InnoSetup : event 함수들 [Setup event functions] function InitializeSetup(): Boolean;Called during Setup's initialization. Return False to abort Setup, True otherwise.procedure InitializeWizard();Use this event function to make changes to the wizard or wizard pages at startup. You can't use theInitializeSetup event function for this since at the time it is triggered, the wizard form does not yet exist.procedure Deinitia.. 2013. 8. 7.
[Delphi] InnoSetup : 방화벽 추가 InnoSetup [Code] 부분에 이대로 추가하면 된다설치할때 추가하고 삭제할때 제거된다 검색해서 나오는 자료들은 죄다 예전 소스들이라 힘들었음 ㄱ- [Code] constNET_FW_SCOPE_ALL = 0;NET_FW_IP_VERSION_ANY = 2;NET_FW_ACTION_ALLOW = 1; procedure SetFirewallExceptionXP(AppName,FileName:string);var FirewallObject: Variant; FirewallManager: Variant; FirewallProfile: Variant;begin tryFirewallObject := CreateOleObject('HNetCfg.FwAuthorizedApplication');FirewallObje.. 2013. 8. 7.
[Delphi] InnoSetup : 설치/제거 할 때 프로그램 종료하기 InnoSetup [Code] 부분에 이렇게 넣으면 설치하거나 제거할 때 강제로 프로세스를 종료한다! [Code]constWM_CLOSE = $0010; // 프로그램 설치 시 function InitializeSetup: Boolean;varWnd: HWND;beginwhile(true) dobeginWnd := FindWindowByClassName('메인폼클래스명');if Wnd 0 thenbeginSendMessage(Wnd, WM_CLOSE, 0, 0);endelsebeginbreak;end;end; Result := True;end; // 프로그램 제거 시 function InitializeUninstall: Boolean;varWnd: HWND;beginwhile(true) dobeginWn.. 2013. 8. 7.