Click here to Skip to main content
15,566,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to pass the parameter through pascal script,anyone please help (i dont know this is the correct way or not)
(my EXE database is database application.once installed the application. we need to login google,enter the used id and password)

What I have tried:

Pascal
[Run]
Filename: "{app}\Install.bat"; Description: "{cm:LaunchProgram,{#StringChange("Datastudio" , '&', '&&')}}"; Flags:
Filename: "C:\Users\Administrator\Desktop\Nov 1\*"; Parameters:Password='global' {code:Password}


[Code]
function PASS(Param: String): String;
var
Password: string;
begin
Result := 'global';
end;
Posted
Updated 1-Nov-22 0:35am
v2

1 solution

Example from Inno Setup Help[^]
[Run]
Filename: "{app}\INIT.EXE"; Parameters: "/x"


Your code with a wildcard probably won't work, try like this:
Filename: "C:\Users\Administrator\Desktop\Nov 1\myapp.exe"; 
 Parameters: "Password=global"


If you want to use a function, you can use something like this:
[Run]
Filename: "SomeProgram.exe"; Parameters: {code:GetParams}

[Code]
var
  ConfigPage: TInputQueryWizardPage;

function GetParams(Value: string): string;
begin
  Result := ConfigPage.Values[0];
end;

procedure InitializeWizard;
begin
  { Create the page }
  ConfigPage :=
    CreateInputQueryPage(
      wpWelcome, 'User input', 'User input',
      'Please specify the following information, then click Next.');
  { Add items (False means it's not a password edit) }
  ConfigPage.Add('Input here:', False);
  { Set initial values (optional) }
  ConfigPage.Values[0] := ExpandConstant('hello');
end;

See: inno-setup-how-to-pass-variable-from-code-to-run-or-other-section[^]
 
Share this answer
 
v4
Comments
murali 2022 1-Nov-22 7:54am    
Its not working,

how to pass the password related parameters through innosetup?
RickZeeland 1-Nov-22 8:14am    
What is not working? my examples?
murali 2022 2-Nov-22 11:27am    
Its working, thank you somuch
RickZeeland 2-Nov-22 15:53pm    
Hooray! then you can mark this as solved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900