Recupération du client citrix dans une application vb.net

2kkad Messages postés 1 Date d'inscription mercredi 25 avril 2007 Statut Membre Dernière intervention 25 avril 2007 - 25 avril 2007 à 11:58
crocejf2000 Messages postés 260 Date d'inscription lundi 27 janvier 2003 Statut Membre Dernière intervention 27 août 2008 - 16 août 2008 à 10:42
Je voudrais pouvoir recuperer dans une variable l'identité du poste client citrix executant une application partagée sur un serveur citrix chaque fois que l'application est lancée depuis le poste client.

3 réponses

crocejf2000 Messages postés 260 Date d'inscription lundi 27 janvier 2003 Statut Membre Dernière intervention 27 août 2008 1
25 avril 2007 à 15:11
0
cs_BiloSoft Messages postés 1 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 15 août 2008
15 août 2008 à 14:30
Le lien contient juste les commandes
comment on fait pour recupérer le netbios du poste client qui a lancée l'appli
0
crocejf2000 Messages postés 260 Date d'inscription lundi 27 janvier 2003 Statut Membre Dernière intervention 27 août 2008 1
16 août 2008 à 10:42
Google est ton ami :

fr&q=%25COMPUTERNAME%25+VB.NET&btnG=Rechercher&meta= http://www.google.fr/search?hl=fr&q=%25COMPUTERNAME%25+VB.NET&btnG=Rechercher&meta=
http://www.developerfusion.co.uk/forums/p/36098/126050/
http://www.builderau.com.au/program/vb/soa/Retrieving-environment-variables-with-VB-NET/0,339028462,339272248,00.htm

Windows stores some important information (e.g., computer name and
user name) in the environment variables. The ability to access these
variables to retrieve their values comes in handy in many applications.
In this tip, I look at how you can use VB.NET to retrieve the
information from the environment variables.

In order to get information from the Windows environment variable,
you need to determine the values of corresponding environment
variables. VB.NET allows you to perform this operation by utilising two
methods of the System.Environment class: GetEnvironmentVariable and GetEnvironmentVariables. The following examples show you how these classes work.

Example 1

In the following example, I define a variable to strComputerName. To determine the computer name, I utilise the method GetEnvironmentVariable of the Environment class and pass it to the specific name of the environment variable that I want to retrieve, which in this case is "COMPUTERNAME".

Private Sub GetEnvironmentVariable()
Dim strComputerName As String
strComputerName = Environment.GetEnvironmentVariable("COMPUTERNAME")
MessageBox.Show(strComputerName)
End Sub

Example 2

For this example, I added a listbox control, ListBox1, to the form and the code. I define the variable dictEntry as a DictionaryEntry. Then, I create a loop to go through all environment variables, utilising the GetEnvironmentVariables method of the Environment object. For every entry, I add a line to the listbox control with the key of the entry and its value.

Private Sub GetEnvironmentVariables()
Dim dictEntry As System.Collections.DictionaryEntry
ForEach dictEntry In Environment.GetEnvironmentVariables()
ListBox1.Items.Add("Key: " & (dictEntry.Key.ToString()) &
" Value: " & _ (dictEntry.Value.ToString()))
Next
End Sub

A+,Hart
0
Rejoignez-nous