Why does this not get removed?

85 views
Skip to first unread message

pkappe...@gmail.com

unread,
Apr 26, 2020, 5:07:21 PM4/26/20
to inno...@googlegroups.com

When I use this

 

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};$(MYSOFT)\RAR\D103\Win64"; Tasks: "d2022"; Check: NeedsAddPath('D10364', '$(MYSOFT)\RAR\D103\Win64') ;  MinVersion: 0.0,5.0;

 

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};{app}\D103\Win64"; Tasks: "d2022"; Check: NeedsAddPath('D10364', '\D103\Win64') ;  MinVersion: 0.0,5.0;

 

 

The last one gets removed from the system,  but not the 1st one where I use the $(MYSOFT)  in it.

 

Any idea why?

 

 

Thank you

 

Eivind Bakkestuen

unread,
Apr 26, 2020, 8:36:35 PM4/26/20
to inno...@googlegroups.com
"gets removed from the system" isn't entirely clear to me, please post enough detail to understand the problem.

Are you aware that you can run your installer with /LOG parameter to get details on what it does?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/000e01d61c0e%24ac1908d0%24044b1a70%24%40gmail.com.

pkappe...@gmail.com

unread,
Apr 26, 2020, 9:19:13 PM4/26/20
to inno...@googlegroups.com

When I install my source into delphi, all the paths are added..

Once I uninstall only the  1 get’s removed from the registry except the $(MYSOFT)\RAR\D103\Win64  Entry

That one does net get removed at all.

Almost seems like it doesn’t like the $(MYSOFT)  section.

 

The /LOG doesn’t show me anything about the keys that are added or removed from the registry

pkappe...@gmail.com

unread,
Apr 27, 2020, 2:02:08 AM4/27/20
to inno...@googlegroups.com

Here is the full source

Spent all weekend figuring it out, but I can’t seem to find the problem.

Everything gets removed from the registry except the ones with  “$(MYSOFT)\”  in it.

 

Any help is appreciated.

 

Thank you

 

 

#define MyAppName "RAR Component"

 

 

[Setup]

AppName=RAR Component  TEST PACKAGE

AppVerName=RAR Component 1.0

DefaultDirName={localappdata}\Delphi Components\RAR

DefaultGroupName=RAR Component

OutputBaseFilename=RAR Component 1.0

Compression=lzma2

 

 

[Dirs]

 

Name: "{app}";  Permissions: users-modify;

Tasks: "d2022"; Name: "{commondocs}\Embarcadero\Studio\20.0\Bpl";  

Tasks: "d2022"; Name: "{commondocs}\Embarcadero\Studio\20.0\Dcp";

 

[Tasks]

Name: "d2022";  Description: "Delphi XE10.3 Rio";    Check: "DELPHI('D103')";

 

 

[Types]

;Name: "full";   Description: "Full installation"  ;

;Name: "custom"; Description: "Custom installation";Flags: iscustom 

 

 

 

[code]

 

 

function GetRegistryfor(CEdition:String) : string;

var Edition : String;       

begin 

if cEdition='D103' then Edition:='Software\Embarcadero\BDS\20.0';

Result :=  Edition;         

end;

 

function RemoveSlashUDF(cPath:String):String;

begin

If Copy(cPath,Length(cPath),1) = '\' then cPath := Copy(cPath,1,Length(cPath)-1);                      

Result := cPath;

end;

 

function GetRoot(cEdition:String):String;

var RValue, retVal: String;          

begin    

if RegQueryStringValue(HKEY_CURRENT_USER, GetRegistryfor(cEdition) , 'RootDir', RValue) then

   begin

   RValue := RemoveSlashUDF(RValue);

   retVal :=  RValue ;              

   end;  

Result := retVal;

end;

 

function Compile32(cEdition:String):String;

var RValue, retVal: String;          

begin    

  if RegQueryStringValue(HKEY_CURRENT_USER, GetRegistryfor(cEdition) , 'RootDir', RValue) then

     begin

        retVal :=  RemoveSlashUDF(RValue) + '\bin\dcc32.exe';

        if cEdition='D103' then createdir(ExpandConstant('{app}') + '\D103\');

     end;

  Result := retVal;

end;

 

function Compile64(cEdition:String):String;

var RValue, retVal: String;          

begin    

  if RegQueryStringValue(HKEY_CURRENT_USER, GetRegistryfor(cEdition) , 'RootDir', RValue) then

     begin

        retVal :=  RemoveSlashUDF(RValue) + '\bin\dcc64.exe';

        if cEdition='D103' then createdir(ExpandConstant('{app}') + '\D103\Win64');

     end;

  Result := retVal;

end;

 

 

 

function DELPHI(cEdition:String):Boolean;

var RValue: String;   

    retVal: Boolean;          

begin  

 

if RegQueryStringValue(HKEY_CURRENT_USER, GetRegistryfor(cEdition) , 'RootDir', RValue) then                              

    begin

    retVal := FileExists(RemoveSlashUDF(RValue) + '\bin\dcc32.exe');       

    end;

Result :=  retVal; 

end;

 

 

function ExpandBPLDCP(cEdition: String; cBPLDCP:String): String;

begin  

if cEdition = 'D103' then

   Result :=  ExpandConstant('{commondocs}') + '\Embarcadero\Studio\20.0\' + cBPLDCP;   

end;

 

function ExpandBDSCOMMONDIR_DCP(cEdition: String): String;

begin  

Result := ExpandBPLDCP(cEdition,'Dcp');

end;

 

 

function UpdateLibPath(cVersion: String; cRegKey : String) : String;

var Searchstring : String;  

    PATH : String;            

begin

if cVersion='D103' then Searchstring:=';' + ExpandConstant('{app}') + '\D103';

 

//Searchstring:=';' + ExpandConstant('{app}') + '\source';

if RegQueryStringValue(HKCU, cRegKey, 'Search Path', PATH) then

   begin

   StringChangeEx(PATH, Searchstring, '', True);

   StringChangeEx(PATH, ';;', ';', True);

   RegWriteStringValue(HKCU, cRegKey, 'Search Path', PATH);

   end;

end;

   

function NeedsAddPath(cEdition: string; Param: string): boolean;

var

  OrigPath: string;

  Edition : string;

begin

if cEdition='D103'   then Edition:='Software\Embarcadero\BDS\20.0\Library\Win32';

if cEdition='D10364' then Edition:='Software\Embarcadero\BDS\20.0\Library\Win64';

 

 

Param:= ExpandConstant('{app}')+Param;

  if not RegQueryStringValue(HKCU, Edition,'Search Path', OrigPath)

  then begin

    Result := True;

    exit;

  end;

  Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;

end;

 

 

function NeedSearchPath(cEdition: string): string;

var

  OrigPath: string;

  Edition : string;

begin

if cEdition='D103'   then Edition:='Software\Embarcadero\BDS\20.0\Library\Win32';

if cEdition='D10364' then Edition:='Software\Embarcadero\BDS\20.0\Library\Win64';

 

 

RegQueryStringValue(HKCU, Edition,'Search Path', OrigPath);

Result :=OrigPath;

end;

 

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);

begin

  case CurUninstallStep of

    usPostUninstall:

      begin     

      UpdateLibPath('D103' ,'Software\Embarcadero\BDS\20.0\Library\Win32');

      UpdateLibPath('D103' ,'Software\Embarcadero\BDS\20.0\Library\Win64');   

      end;

  end;

end;

 

 

function ExpandBDSCOMMONDIR_BPL(cEdition: String): String;

begin

WizardForm.ProgressGauge.Position := WizardForm.ProgressGauge.Position  + 1;

Result := ExpandBPLDCP(cEdition,'Bpl');

end;

 

 

function ResetProgressBar(nCount:Integer):Boolean;

begin

WizardForm.ProgressGauge.Position := 0;

WizardForm.ProgressGauge.Max := nCount;  

Result := True;

end;

 

function PackageInfo(cMsg:String):Boolean;

Begin  

WizardForm.FileNameLabel.Caption :=  'Compiling and installing: '+cMsg + ' ...';

Result := True;

End;

 

     

 

[Components]

Name: "crar"; Description: "RAR Component"; Types: full

 

[Files]

Components: "crar"; Source:  "RAR\*";  DestDir: "{app}"; MinVersion: 0.0,5.0; Flags: recursesubdirs

 

 

[Registry]                

; Adding the bpl file to the component package

 

 

Root: HKCU; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"

 

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Known Packages"; Components: "crar"; ValueName: "{code:ExpandBDSCOMMONDIR_BPL|D103}\RARComponentDesign260.bpl"; ValueType: String; ValueData: "RAR Component support"; Tasks: "d2022";  MinVersion: 0.0,5.0; Flags: uninsdeletevalue

 

; Add the folder to the search path                       

 

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win32"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};$(MYSOFT)\RAR\D103";       Tasks: "d2022"; Check: NeedsAddPath('D103',   '$(MYSOFT)\RAR\D103')       ;  MinVersion: 0.0,5.0;

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};$(MYSOFT)\RAR\D103\Win64"; Tasks: "d2022"; Check: NeedsAddPath('D10364', '$(MYSOFT)\RAR\D103\Win64') ;  MinVersion: 0.0,5.0;

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win32"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};{app}\D103";               Tasks: "d2022"; Check: NeedsAddPath('D103',   '\D103')                    ;  MinVersion: 0.0,5.0;

Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};{app}\D103\Win64";         Tasks: "d2022"; Check: NeedsAddPath('D10364', '\D103\Win64')              ;  MinVersion: 0.0,5.0;

 

Root: HKCU; Subkey: "Software\Embarcadero\BDS\20.0\Globals"; ValueName: "ForceEnvOptionsUpdate"; ValueType: String; ValueData: "1";  Tasks: "D2022"

 

Root: HKCU; Subkey: "Software\Embarcadero\BDS\20.0\Environment Variables"; ValueName: "MYSOFT"; ValueType: String; ValueData: "{localappdata}\Delphi Components";  Tasks: "D2022"

 

 

[Run]

Filename: "compiler";   Check: "ResetProgressBar(2)";  Tasks: "d2022";    StatusMsg: "Compiling Delphi XE10.3 Rio package";     Flags: runhidden skipifdoesntexist

 

Filename: "{code:Compile32|D103}"; Check: "PackageInfo('RAR\Packages\RAD Studio XE10.3\RARComponent.dpk')";        Parameters: "-B ""{app}\Packages\RAD Studio XE10.3\RARComponent.dpk""       -Q -I""{code:Needsearchpath|D103}""       -LE""{code:ExpandBDSCOMMONDIR_BPL|D103}""       -LN""{code:ExpandBDSCOMMONDIR_DCP|D103}""       -NU""{app}\D103""       -NS""System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;Data.Win;Web.Win;Soap.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;"""; WorkingDir: "{app}\Source" ; Tasks: "d2022";  MinVersion: 0.0,5.0; Flags: runhidden;   

Filename: "{code:Compile32|D103}"; Check: "PackageInfo('RAR\Packages\RAD Studio XE10.3\RARComponentDesign.dpk')";  Parameters: "-B ""{app}\Packages\RAD Studio XE10.3\RARComponentDesign.dpk"" -Q -I""{code:Needsearchpath|D103}""       -LE""{code:ExpandBDSCOMMONDIR_BPL|D103}""       -LN""{code:ExpandBDSCOMMONDIR_DCP|D103}""       -NU""{app}\D103""       -NS""System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;Data.Win;Web.Win;Soap.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;"""; WorkingDir: "{app}\Source" ; Tasks: "d2022";  MinVersion: 0.0,5.0; Flags: runhidden;   

Filename: "{code:Compile64|D103}"; Check: "PackageInfo('RAR\Packages\RAD Studio XE10.3\RARComponent.dpk')";        Parameters: "-B ""{app}\Packages\RAD Studio XE10.3\RARComponent.dpk""       -Q -I""{code:Needsearchpath|D103}\Win64"" -LE""{code:ExpandBDSCOMMONDIR_BPL|D103}\Win64"" -LN""{code:ExpandBDSCOMMONDIR_DCP|D103}\Win64"" -NU""{app}\D103\Win64"" -NS""System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;Data.Win;Web.Win;Soap.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;"""; WorkingDir: "{app}\Source" ; Tasks: "d2022";  MinVersion: 0.0,5.0; Flags: runhidden;   

 

 

 

 

[Icons]

 

 

[UninstallDelete]

Type: filesandordirs; Name: "{app}\D103"

 

Type: files;          Name: "{app}\*.*"

Type: dirifempty;     Name: "{app}"

;Deleting BPL and DCP

 

Type: files;  Name: "{commondocs}\Embarcadero\Studio\20.0\Bpl\rarcompo*.bpl"

Type: files;  Name: "{commondocs}\Embarcadero\Studio\20.0\Dcp\rarcompo*.dcp"

Type: files;  Name: "{commondocs}\Embarcadero\Studio\20.0\Bpl\Win64\rarcompo*.bpl"

Type: files;  Name: "{commondocs}\Embarcadero\Studio\20.0\Dcp\Win64\rarcompo*.dcp"

 

 

 

 

 

From: inno...@googlegroups.com <inno...@googlegroups.com> On Behalf Of Eivind Bakkestuen
Sent: Sunday, April 26, 2020 7:36 PM
To: inno...@googlegroups.com
Subject: Re: Why does this not get removed?

 

"gets removed from the system" isn't entirely clear to me, please post enough detail to understand the problem.

Perry Kappetein

unread,
Apr 27, 2020, 5:53:13 PM4/27/20
to innosetup

Thought I responded, but the log doesn't tell me nothing :(

I think it's a bug in  inno.  Not sure if the creator can respond as well

Deleting something like "c:\blablabla"  works
but
deleting something like "$(blablabla)"  fails

unless something in my code is preventing it,  but then,  why is it able to add it..
The uninstall part seem to fail.

Gavin Lambert

unread,
Apr 27, 2020, 6:36:07 PM4/27/20
to inno...@googlegroups.com
On 27/04/2020 09:07, pkappe...@gmail.com wrote:
> When I use this
>
> Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64";
> Components: "crar"; ValueName: "Search Path"; ValueType: String;
> ValueData: "{olddata};$(MYSOFT)\RAR\D103\Win64"; Tasks: "d2022"; Check:
> NeedsAddPath('D10364', '$(MYSOFT)\RAR\D103\Win64') ;  MinVersion: 0.0,5.0;
>
> Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64";
> Components: "crar"; ValueName: "Search Path"; ValueType: String;
> ValueData: "{olddata};{app}\D103\Win64"; Tasks: "d2022"; Check:
> NeedsAddPath('D10364', '\D103\Win64') ;  MinVersion: 0.0,5.0;
>
> The last one gets removed from the system,  but not the 1^st one where I
> use the $(MYSOFT)  in it.

There is nothing in either of those lines that would remove either value
on uninstall.

If something is being removed on uninstall, then you have some
uninstall-time [Code] elsewhere that does it, and you probably have not
updated it for your new value.

It pays to fully understand how all of the script code you've copied
from the web actually operates.

Also note that $(MYSOFT) wouldn't normally be a legal value to have in a
path anyway -- it's a relative path (with a silly folder name). It
could only work if the app that reads that path from the registry does
some custom expansion.

pkappe...@gmail.com

unread,
Apr 27, 2020, 6:53:42 PM4/27/20
to inno...@googlegroups.com
I had posted the whole code.

There seems to be something with the uninstall routine, that is picking up the wrong information.

Trying to see pass a Var instead of {app} but need to figure out how, and if it's possible


-----Original Message-----
From: inno...@googlegroups.com <inno...@googlegroups.com> On Behalf Of Gavin Lambert
Sent: Monday, April 27, 2020 5:36 PM
To: inno...@googlegroups.com
Subject: Re: Why does this not get removed?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/d1212d73-370b-7184-b291-0b44eeaae4c4%40mirality.co.nz.

Gavin Lambert

unread,
Apr 27, 2020, 8:14:51 PM4/27/20
to inno...@googlegroups.com
On 28/04/2020 10:53, pkappe...@gmail.com wrote:
> I had posted the whole code.
>
> There seems to be something with the uninstall routine, that is picking up the wrong information.

Then you are mistaken; as I said, without additional code, neither of
those would be removed on uninstall.

> Trying to see pass a Var instead of {app} but need to figure out how, and if it's possible

What do you mean by "a Var"?

There is nothing magical about "$(MYSOFT)"; it will get saved into the
registry as that literal text.

Why don't you want to use {app}?

pkappe...@gmail.com

unread,
Apr 27, 2020, 8:51:01 PM4/27/20
to inno...@googlegroups.com
If I am using Delphi,
I need to update the search patch to like

C:\program files\my software\installed ones\RAR\Source
C:\program files\my software\installed ones\My complicated one\Source

So it becomes really long.
With the Env. Var you set in delphi I can set MYSOFT = C:\program files\my software\installed ones\

Then I only need

$(MYSOFT)\RAR\Source
$(MYSOFT)\My complicated one\Source

So it makes it a lot shorter.

Esp if the main folder would be like
C:\Users\Publc\Documents\Roaming\Embarcadero\Studio\Projects\
For all the installations

So the {app} is showing the full name.. I just wanted a "Short Name"

I did narrow down where the problem is, and it's in the UpdateLibPath function, since it's using the {app} part.
Somehow I need to replace that with the "$(PKSOFT)" One

And I can't seem to figure it out.

Below is the full short source.. which only does the registry part.




;InnoSetupVersion=5.6.1 (Unicode)

#define MyAppName "RAR Component"
#define shortname "$(PKSOFT)"


[Setup]
AppName=RAR Component TEST PACKAGE
AppVerName=RAR Component 1.0
DefaultDirName={localappdata}\Delphi Components\RAR
DefaultGroupName=RAR Component
OutputBaseFilename=RAR Component 1.0
Compression=lzma2


[Dirs]

Name: "{app}"; Permissions: users-modify;


[Tasks]
Name: "d2022"; Description: "Delphi XE10.3 Rio"; Check: "DELPHI('D103')";

[code]

function DELPHI(cEdition:String):Boolean;
var RValue: String;
retVal: Boolean;
begin

Result := TRUE;
end;


function GetRegistryfor(CEdition:String) : string;
var Edition : String;
begin
if cEdition='D103' then Edition:='Software\Embarcadero\BDS\20.0';
Result := Edition;
end;



function UpdateLibPath(cVersion: String; cRegKey : String) : String;
var Searchstring : String;
PATH : String;
begin
if cVersion='D103' then
Searchstring:=';' + ExpandConstant('{app}') + '\D103';

if RegQueryStringValue(HKCU, cRegKey, 'Search Path', PATH) then
begin
StringChangeEx(PATH, Searchstring, '', True);
StringChangeEx(PATH, ';;', ';', True);
RegWriteStringValue(HKCU, cRegKey, 'Search Path', PATH);
end;




end;

function NeedsAddPath(cEdition: string; Param: string): boolean;
var
OrigPath: string;
Edition : string;
begin
if cEdition='D103' then Edition:='Software\Embarcadero\BDS\20.0\Library\Win32';
if cEdition='D10364' then Edition:='Software\Embarcadero\BDS\20.0\Library\Win64';


//if pos(Param,'$') <> 0 then
[Components]
Name: "crar"; Description: "RAR Component"; Types: full


[Registry]

Root: HKCU; Subkey: "Software\Embarcadero\BDS\20.0\Environment Variables"; ValueName: {shortname}; ValueType: String; ValueData: "{localappdata}\Delphi Components"; Tasks: "D2022"


; Add the folder to the search path
Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win32"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};$(PKSOFT)\RAR\D103"; Tasks: "d2022"; Check: NeedsAddPath('D103', '$(PKSOFT)\RAR\D103') ; MinVersion: 0.0,5.0;
Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};$(PKSOFT)\RAR\D103\Win64"; Tasks: "d2022"; Check: NeedsAddPath('D10364', '$(PKSOFT)\RAR\D103\Win64') ; MinVersion: 0.0,5.0;

;Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win32"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};{app}\D103"; Tasks: "d2022"; Check: NeedsAddPath('D103', '\RAR\D103') ; MinVersion: 0.0,5.0;
;Root: HKCU; Subkey: "{code:GetRegistryfor|D103}\Library\Win64"; Components: "crar"; ValueName: "Search Path"; ValueType: String; ValueData: "{olddata};{app}\D103\Win64"; Tasks: "d2022"; Check: NeedsAddPath('D10364', '\RAR\D103\Win64') ; MinVersion: 0.0,5.0;

Root: HKCU; Subkey: "Software\Embarcadero\BDS\20.0\Globals"; ValueName: "ForceEnvOptionsUpdate"; ValueType: String; ValueData: "1"; Tasks: "D2022"



[UninstallDelete]
Type: filesandordirs; Name: "{app}\D103"



-----Original Message-----
From: inno...@googlegroups.com <inno...@googlegroups.com> On Behalf Of Gavin Lambert
Sent: Monday, April 27, 2020 7:15 PM
To: inno...@googlegroups.com
Subject: Re: Why does this not get removed?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/a8e19502-7054-2d42-4c77-ac11e01f968b%40mirality.co.nz.

Gavin Lambert

unread,
Apr 27, 2020, 11:44:41 PM4/27/20
to inno...@googlegroups.com
On 28/04/2020 12:50, pkappe...@gmail.com wrote:
> If I am using Delphi,
> I need to update the search patch to like
>
> C:\program files\my software\installed ones\RAR\Source
> C:\program files\my software\installed ones\My complicated one\Source
>
> So it becomes really long.
> With the Env. Var you set in delphi I can set MYSOFT = C:\program files\my software\installed ones\

Why does a long name matter? It would only be used by tools such as
Delphi itself, for example, and it shouldn't care how long it is.

Unless Delphi understands whatever "variable" format you're using (I
have no knowledge whether it does or not, but you should assume it does
not unless proven otherwise) then any shortening won't work anyway.

Using some kind of variable expansion also makes you more vulnerable to
collisions by other software trying to do the same thing (esp. if you
use a too-generic name) or something hijacking the variable to point at
an unintended location (perhaps to compile some malware into apps that
use your component).

> [Setup]
> AppName=RAR Component TEST PACKAGE
> AppVerName=RAR Component 1.0
> DefaultDirName={localappdata}\Delphi Components\RAR
> DefaultGroupName=RAR Component
> OutputBaseFilename=RAR Component 1.0
> Compression=lzma2

You need PrivilegesRequired=lowest as well, if you want to install into
per-user paths and register things in HKCU.

Although using {userpf} is preferred rather than using {localappdata}.

> I did narrow down where the problem is, and it's in the
> UpdateLibPath function, since it's using the {app} part.
> Somehow I need to replace that with the "$(PKSOFT)" One
>
> And I can't seem to figure it out.
I have to question how you are able to develop a Delphi component in the
first place without understanding this. If someone else is the actual
component developer, then get them to help you.
Reply all
Reply to author
Forward
0 new messages