|
#16
|
|||
|
|||
|
thanks now all fine.Only one thing left is how to create these two files from an installer :
1. unpacking portable.cmd 2. silent install.cmd
|
| Sponsored Links |
|
#17
|
||||
|
||||
|
you can open both of those with notepad & see how they are written out.
|
|
#18
|
|||
|
|||
|
jitender
Code:
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={code:GetInstallDir|{pf}\My Application}
DisableProgramGroupPage=yes
Uninstallable=not PortableCheck
OutputDir=.
[Files]
Source: "MyProg - installer.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: InstallerCheck;
Source: "MyProg - portable.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: PortableCheck;
[Icons]
Name: "{commondesktop}\My Application"; Filename: "{app}\MyProg - installer.exe"; Check: InstallerCheck;
This is CODE section add [] +Code
var
Portable,Installer: TNewRadioButton;
function CheckParam(s: string): boolean;
var
i: integer;
begin
for i := 0 to ParamCount do begin
Result := ParamStr(i) = s;
if Result then Break;
end;
end;
function GetInstallDir(S: String): String;
begin
if CheckParam('/P') then
Result:= ExpandConstant('{userdesktop}\My Application Portable')
else
Result:= ExpandConstant(S);
end;
function PortableCheck: Boolean;
begin
Result := Portable.Checked or CheckParam('/P');
end;
function InstallerCheck: Boolean;
begin
Result := Installer.Checked or CheckParam('/I');
end;
procedure InitializeWizard();
begin
WizardForm.DirEdit.Text:= ExpandConstant('{code:GetInstallDir|{pf}\My Application}');
Portable := TNewRadioButton.Create(WizardForm);
with Portable do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(110);
Top := ScaleY(175);
Width := ScaleX(100);
Height := ScaleY(17);
Caption := 'Портативная';
Checked := CheckParam('/P');
end;
Installer := TNewRadioButton.Create(WizardForm);
with Installer do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(175);
Width := ScaleX(100);
Height := ScaleY(17);
Caption := 'Стационарная';
Checked := not CheckParam('/P');
end;
end;
Portable
start /wait setup.exe /VERYSILENT /P
Installer
start /wait setup.exe /VERYSILENT /I
Last edited by pakrat2k2; 05-03-2018 at 21:05. |
|
#19
|
|||
|
|||
|
I have this code:
http://fileforums.com/attachment.php...9&d=1519677850 Now please Download above script and modify it and give me final one which create portable + silent install also.( i don't know coding otherwise i had modified it) Last edited by pakrat2k2; 05-03-2018 at 21:06. Reason: STOP QUOTING MESSAGES |
|
#20
|
|||
|
|||
|
jitender
Code:
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[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={{AEB246C4-0FD6-4C59-8EEF-03944CDFDDA5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetInstallDir|{pf}\My Application}
DisableProgramGroupPage=yes
Uninstallable=not PortableCheck
OutputDir=.
OutputBaseFilename=setup
Compression=none
SolidCompression=yes
BackColorDirection=lefttoright
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: Include\Splash.png; DestDir: {tmp}; Flags: dontcopy
Source: Include\isgsg.dll; DestDir: {tmp}; Flags: dontcopy
Source: "MyProg - installer.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: InstallerCheck;
Source: "MyProg - portable.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: PortableCheck;
[Icons]
Name: {commonprograms}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; Check: InstallerCheck;
[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: nowait postinstall skipifsilent
;Code section add [] to front of line.
var
URLText: TNewStaticText;
Portable,Installer: TNewRadioButton;
procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
procedure URLTextClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
function CheckParam(s: string): boolean;
var
i: integer;
begin
for i := 0 to ParamCount do begin
Result := ParamStr(i) = s;
if Result then Break;
end;
end;
function GetInstallDir(S: String): String;
begin
if CheckParam('/P') then
Result:= ExpandConstant('{userdesktop}\My Application Portable')
else
Result:= ExpandConstant(S);
end;
function PortableCheck: Boolean;
begin
Result := Portable.Checked or CheckParam('/P');
end;
function InstallerCheck: Boolean;
begin
Result := Installer.Checked or CheckParam('/I');
end;
procedure NewRadioButton1Click(Sender: TObject);
begin
if Portable.Checked then
WizardForm.DirEdit.Text:= ExpandConstant('{userdesktop}\My Application Portable')
else
WizardForm.DirEdit.Text:= ExpandConstant('{pf}\My Application');
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('Splash.png');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);
with WizardForm do begin
Color := $d78318;
end;
URLText := TNewStaticText.Create(WizardForm);
with URLText do begin
Parent := WizardForm;
Left := ScaleX(10);
Top := ScaleY(331);
Width := ScaleX(156);
Height := ScaleY(23);
Caption := 'My Website';
Cursor := crHand;
Color := clWhite;
Font.Style := [fsUnderline];
Transparent := True;
OnClick := @URLTextClick;
end;
Portable := TNewRadioButton.Create(WizardForm);
with Portable do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(110);
Top := ScaleY(175);
Width := ScaleX(100);
Height := ScaleY(17);
Caption := 'Портативная';
Checked := CheckParam('/P');
OnClick := @NewRadioButton1Click;
end;
Installer := TNewRadioButton.Create(WizardForm);
with Installer do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(175);
Width := ScaleX(100);
Height := ScaleY(17);
Caption := 'Стационарная';
Checked := not CheckParam('/P');
OnClick := @NewRadioButton1Click;
end;
end;
Last edited by pakrat2k2; 05-03-2018 at 21:02. Reason: code your entries so not wall of text |
|
#21
|
|||
|
|||
|
Getting these question marks???
![]() DO NOT QUOTE ENTIRE MESSAGE, JUST REPLY Last edited by pakrat2k2; 05-03-2018 at 21:04. Reason: remove wall of text |
|
#22
|
|||
|
|||
|
Portable := TNewRadioButton.Create(WizardForm);
with Portable do begin Parent := WizardForm.SelectDirPage; Left := ScaleX(110); Top := ScaleY(175); Width := ScaleX(100); Height := ScaleY(17); Caption := 'Portable'; Checked := CheckParam('/P'); OnClick := @NewRadioButton1Click; end; Installer := TNewRadioButton.Create(WizardForm); with Installer do begin Parent := WizardForm.SelectDirPage; Left := ScaleX(0); Top := ScaleY(175); Width := ScaleX(100); Height := ScaleY(17); Caption := 'Installer'; Checked := not CheckParam('/P'); OnClick := @NewRadioButton1Click; end; end; jitender + vint56 do NOT Quote messages ANY further, just reply to post. useless to keep quoting previous messages. Last edited by pakrat2k2; 05-03-2018 at 21:08. |
| The Following User Says Thank You to vint56 For This Useful Post: | ||
jitender (06-03-2018) | ||
|
#23
|
|||
|
|||
|
So this script create two options in setup: 1)portable 2)silent install
So, it means if i select portable option then portable version of program will install or if i select silent then it will perform silent installation.Am i right? |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fallout Nv Ultimate Edition 3xDVD9 to 2xDVD5 InnoSetup 1 LANGUAGE | THADEADMAN2011 | PC Games - CD/DVD Conversions | 9 | 04-09-2022 05:40 |
| Ridge Racer Unbounded + innosetup installer | clriboli | PC Games - CD/DVD Conversions | 2 | 31-01-2015 14:53 |
| Unarc innosetup | gabrimor | PC Games | 7 | 08-12-2012 12:23 |