Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SESSIONNAME Windows variable
Message
De
11/10/2012 17:21:41
 
 
À
11/10/2012 17:07:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01554855
Message ID:
01554856
Vues:
57
>Hi all,
>
>Have used GETENV("SessionName") in one spot in my code to detect if the user was logging on via a Terminal Server (RDS, 2008R2) and if so, automatically set some print options for them. (the user's fire up their app via a shortcut on their RDC desktop which points back to their app on another file server).
>
>But it has been mis-behaving lately (or maybe it always did and they did not report it). Somtimes SESSIONNAME returns "RDP-Tcp#x" and sometimes it is empty. (it should return "Console" for non-RDC sessions). I put some code into their app to display the value of SESSIONNAME. Sometimes it is populated, other times it is not.
>
>If I open a DOS prompt on the server, it is always populated. Likewise, if I launch the app by first launching a command session:
>
>C:\Windows\System32\cmd.exe /c "F:\Claims\Mk.exe" (i.e. the shortcut)
>
>It seems to always populate. (BTW, I figured that out as that was the only way I could get the app to be pinned to a Windows 7 taskbar, but that is another story).
>
>Anyone know what's up with SESSIONNAME - or is there an easier, goof-proof way to detect if the user is in an RDC session?

OS( 10 ) may help.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform