Skip to main content

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
------------------------------

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
------------------------------

Hi Ingo,

we had been facing the same issue. In our environment each developer has by default a particular user-folder ( a share)  "U:".

So I could send the UDBG.CNF into this folder:

[FILES]
UDBG.CNF        u:\\system\\UDBG10.CNF

We did the same with ide_state.zip. Maybe also a solution for you?

Best regards



------------------------------
Michael Rösch
Abrechnungszentrum Emmendingen
------------------------------


Hi Ingo,

we had been facing the same issue. In our environment each developer has by default a particular user-folder ( a share)  "U:".

So I could send the UDBG.CNF into this folder:

[FILES]
UDBG.CNF        u:\\system\\UDBG10.CNF

We did the same with ide_state.zip. Maybe also a solution for you?

Best regards



------------------------------
Michael Rösch
Abrechnungszentrum Emmendingen
------------------------------

Hi Michael

The U-drive is actually a good idea and would also work for us on the clients. Each user has a U-directory on a server.
We don't (yet) have this for the individual users on our development server.
Let's see if I can set up a kind of U-directory there too :-)

Ingo



------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------

Hi Michael

The U-drive is actually a good idea and would also work for us on the clients. Each user has a U-directory on a server.
We don't (yet) have this for the individual users on our development server.
Let's see if I can set up a kind of U-directory there too :-)

Ingo



------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------

ThanX Michael
On the server, I link user depending folders to the U-drive.
And in the startup folder a place a simple batch file:

net use U: \\\\server\\user_folders\\$%USERNAME%

So the U-drive is always avail 

Ingo



------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------

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
------------------------------

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
------------------------------

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
------------------------------

Hi David
ThanX for the tip
Intressting that on can alos do calculations inside the brackets.
I like to see such flexibility also in UnifAce's precompiler directives :-)
Ingo



------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------

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
------------------------------

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
------------------------------

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
------------------------------

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
------------------------------

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
------------------------------

Hi David
We do have also such API to get the logged in user. 
In our user mangement, every user/clerk can assigned to a windows user. So with th information out of the API we can do a trusted/single login.
After the login, there are a few global variables holding information of the user.
That's neatly working and the clerk only cann start components or see data that he/she is assigned to.

But in the development envionment it's a little bit different. 
You don't always want to load the whole entire environment just to test something quickly.
Nevertheless, one developer/tester shouldn't always be aware of everything the other is doing. So quite simply
IF($user=="IST") debug
IF($user=="AW") putmess "hello world"
...
And $user is perfect for this.

That's why it would be awesome from Uniface if something like this were possible in the ASN/INI file
[user]
#if (%%($username)="ingo")
name=IST
#elseif (%%($username)="andreas")
name=AW
#endif

Ingo



------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------

Hi Ingo,

we had been facing the same issue. In our environment each developer has by default a particular user-folder ( a share)  "U:".

So I could send the UDBG.CNF into this folder:

[FILES]
UDBG.CNF        u:\\system\\UDBG10.CNF

We did the same with ide_state.zip. Maybe also a solution for you?

Best regards



------------------------------
Michael Rösch
Abrechnungszentrum Emmendingen
------------------------------

Hello,

We did find a nice solution using environment variables:

udbg.cnf = %%($LOCALAPPDATA)/molis/udbg10.cnf

The Windows environment variable LOCALAPPDATA is depending on user and is something like C:\\Users\\<user name>\\AppData\\Local.



------------------------------
Bertrand Daene
Senior Developper
Cgm Lab International Gmbh (Lab Molis)
Barchon BE
------------------------------