Hi Ingo, I'm not sure of your use case for setting the username in the .ini file, but you can get the value of the USERNAME environment variable (or any other) in ProcScript using $SETTINGS: https://docs.rocketsoftware.com/bundle/uniface_104/page/kig1665702697791.html
Note: as far as I'm aware, this environment variable contains the username of the logged in user, so if you're impersonating another user the value might be incorrect. When i've need to do that in the past, i've created a signature for the Windows API function to get the current user and activated that.
My memory is a bit hazy here, but I believe certain actions such as authenticating against an active directory domain in a web application using Tomcat can set $user automatically.
------------------------------
David Akerman
Principal Solution & Enablement Architect
Rocket Internal - All Brands
------------------------------
Original Message:
Sent: 07-08-2024 04:52
From: Ingo Stiller
Subject: UDBG.CNF : Developer dependent naming?
Hi David
This will work only for ASN-Files?
To fill the $user-variable you have to set this in the iNI-File:
[user]
name=xyz
And it would be very nice if this could also be a variable
[user]
name=%%($username)
As this is not possible and it is not possible to use #FILE in a INI-file, you have to copy the whole INI-file for every user.
Yes we do have an extra login-mechanisim with our own user/passwords.
But sometimes (especially in the IDE-environment) you need $user
Any idea: "How to get $user variable depending on the logged in user"
Ingo
Ingo
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
Original Message:
Sent: 07-05-2024 09:06
From: David Akerman
Subject: UDBG.CNF : Developer dependent naming?
While the network drive option might provide a better solution in this case, I'd like to point out that you can use environment variables (such as USERNAME) in assignment files with more recent patch levels: https://vimeo.com/showcase/10552636/video/936206316
------------------------------
David Akerman
Principal Solution & Enablement Architect
Rocket Internal - All Brands
Original Message:
Sent: 07-05-2024 03:38
From: Ingo Stiller
Subject: UDBG.CNF : Developer dependent naming?
Hi Freaks
Currently two developers are programmin on the same server by "remote desktop".
The UnifAce-environment is the same but I do have have different shorcuts to IDE.EXE for them.
I create different ASN and INI*) files for both so that $user=a_name and IDE_STATE_a_name.zip are neatly separated
But if the debugger is about to start, UnifAce always use UDB.CNF as the config file.
Okay, I can modify UDBG.ASN to use another UDBG_a_name.CNF but this is only half the way.
But I do not have any chance to tell IDE.EXE to call UDBG.EXE with a modified commandline.
So any idea to name the UDBG.CNF depending on the current user?
Ingo
PS *) is there any way to use a #FILE in a INI-File? I have to duplicate the whole INI-file and can not redirect to a common core of stettings
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------