Jump to content
PenelopeSkye

Change parameters when compiling using dcc32.exe

Recommended Posts

When I want to compile the project (Delphi 10.3) I just click on the 'Run without debugging' button.  I am then asked for a password and then the app loads.  I am trying to find a place to save my credentials so I don't have to enter them every single time, but I can't find out how.

 

image.thumb.png.564f86c150c3da8138483f47ec32e027.png

 

Can anyone help me find out where to store my credentials?  Thanks!  Please let me know what else you need.

 

I have no idea if this will help but I deliberately made the compile break to get the lines below.

 

Checking project dependencies...
Compiling artdesign.dproj (Debug, Win32)
dcc32 command line for "artdesign.dpr"
  c:\program files (x86)\embarcadero\studio\20.0\bin\dcc32.exe -$O- -$W+ -$R+ -$Q+ -$D1 -$YD --no-config -M -Q -TX.exe 
  -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;
  DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files 
  (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files 
  (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl 
  -LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NSDatasnap.Win;Web.Win;Soap.Win;Xml.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;
  System;Xml;Data;Datasnap;Web;Soap;Bde;Data.Win;Winapi;WinAPI.UI;FMX.MultiView;System.Win; -O"C:\Program Files 
  (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";
  C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -R"C:\Program Files 
  (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";
  C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -U"C:\Program Files 
  (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";
  C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;
  C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -VR -K00400000 -GD 
  -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 -H-  artdesign.dpr   
[dcc32 Fatal Error] F2039 Could not create output file 'artdesign.exe'
Failed
Elapsed time: 00:00:00.8


Build started 9/14/2022 11:40:14 AM.
__________________________________________________
Project "C:\Users\harvebet\Documents\GitHub\ADiMS2 Delphi 10 point 3\artdesign.dproj" (Make target(s)):
Target _PasCoreCompile:
    c:\program files (x86)\embarcadero\studio\20.0\bin\dcc32.exe -$O- -$W+ -$R+ -$Q+ -$D1 -$YD --no-config -M -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NSDatasnap.Win;Web.Win;Soap.Win;Xml.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Bde;Data.Win;Winapi;WinAPI.UI;FMX.MultiView;System.Win; -O"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -R"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -U"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -VR -K00400000 -GD -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 -H-  artdesign.dpr   
    c:\program files (x86)\embarcadero\studio\20.0\Bin\CodeGear.Delphi.Targets(402,5): error F2039: F2039 Could not create output file 'artdesign.exe'
Done building target "_PasCoreCompile" in project "artdesign.dproj" -- FAILED.
Done building project "artdesign.dproj" -- FAILED.
Build FAILED.
c:\program files (x86)\embarcadero\studio\20.0\Bin\CodeGear.Delphi.Targets(402,5): error F2039: F2039 Could not create output file 'artdesign.exe'
    0 Warning(s)
    1 Error(s)
Time Elapsed 00:00:00.58

 

 

Share this post


Link to post
3 hours ago, PenelopeSkye said:

When I want to compile the project (Delphi 10.3) I just click on the 'Run without debugging' button.  I am then asked for a password and then the app loads.  I am trying to find a place to save my credentials so I don't have to enter them every single time, but I can't find out how.

What kind of credentials, exactly?  The IDE doesn't require credentials to compile a project.  Chances are, there is something inside your project itself that is requiring credentials when the app starts running.  Maybe a database?  Or maybe the project contains a UAC manifest that requires the app to run elevated with admin permissions?  There is not enough info provided to diagnose this.  Can you provide a screenshot of the credential prompt?  Then someone can tell you whether it is a native OS dialog or not, at least.

Share this post


Link to post

Here tis, thanks!  

 

The credentials required to run this are those of someone who used to work on this app before I got here.  The only other place I use them is to log into our SAP Crystal reports, but I know of no connection between SAP and this app.

 

The app does attach to a database but the sa credentials do not work for this login.

 

The production app resides on a server but the credentials required to run the app do not get me on the server.

 

image.png.60050d982047edd3f3511712c39d28ba.png

Edited by PenelopeSkye

Share this post


Link to post

This is a Delphi form using TBitBtns, so it has to come from somewhere inside your application. But it may come from some library you use, e.g. a database login build into the data access framework the app uses.

Share this post


Link to post

Run the application in the debugger and when the dialog appears, pause the application in the debugger. You should then be able to examine the call stack in order to determine exactly where in the code the dialog is shown.

Share this post


Link to post

Peter, can you tell me how to look at the libraries?

 

Anders, The highlighted line is where it stopped when I paused it.  Does this point you in any particular direction?  Thanks!

 

777A4F7E 8B0424           mov eax,[esp]
777A4F81 8BE5             mov esp,ebp
777A4F83 5D               pop ebp
777A4F84 C3               ret 
777A4F85 8DA42400000000   lea esp,[esp+$0000]
777A4F8C 8D642400         lea esp,[esp+$00]
ntdll.RtlUserThreadStart:
777A4F90 833DDC69857700   cmp dword ptr [$778569dc],$00
777A4F97 740E             jz $777a4fa7
777A4F99 8B0DDC698577     mov ecx,[$778569dc]
777A4F9F FF15E0918577     call dword ptr [$778591e0]
777A4FA5 FFE1             jmp ecx
777A4FA7 89442404         mov [esp+$04],eax
777A4FAB 895C2408         mov [esp+$08],ebx
777A4FAF E99F2AFFFF       jmp $77797a53
777A4FB4 8DA42400000000   lea esp,[esp+$0000]

Share this post


Link to post

That is the CPU view, the call stack is on the left side. It should contain something like this:

:76f010cc win32u.NtUserWaitMessage + 0xc
:00b4ab5e TApplication.Idle + $14E
Vcl.Forms.TApplication.HandleMessage
Vcl.Forms.TCustomForm.ShowModal
mainrm.TForm1.Button1Click($3417030)
Vcl.Controls.TControl.Click
Vcl.StdCtrls.TCustomButton.Click
Vcl.StdCtrls.TCustomButton.CNCommand(???)
......

 

Most probably the call stack will be empty, in which case open the threads windows with CTRL + ALT + T and select the first thread on the list.

 

 

Share this post


Link to post
15 hours ago, PenelopeSkye said:

Peter, can you tell me how to look at the libraries?

You need to find the database component used for the connection to the database. It may reside in a data module autocreated at program start, so start by opening the dpr file (project -> view source) and check the first Application.CreateForm statements. Open the datamodules one by one and look for a component with "connection" in its type. For FireDAC that would be a TFDConnection component, which has a LoginPrompt property, which is probably set to true in your case. You can set it to false and specify user and password in the Params property to avoid the dialog. Details depend on the database access framework your app uses.

Share this post


Link to post

I found and commented out a couple of lines that allowed me to bypass the login.  I then couldn't use the app because I didn't have permission :).

 

I now see that the app is permeated with authorization checks. I see now how to comment them out (there are many of them) but then I would have to uncomment them before I put the  app into production, which might lead to a security issue if I forget any.

 

I'm not going forward this but thank you so much for your help!!!

 

Penelope

 

 

 

 

 

Edited by PenelopeSkye

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×