Topic: UserName Environment Variable  (Read 1787 times)

UserName Environment Variable
« on: July 14, 2012, 07:46:40 PM »

apinux

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Nov 2011
  • Posts: 52
After spending a few hours debugging an application that refused to run under Gena I found
that it was trying to get the current USERNAME from the system environment variables, but it
seems that Gena is not setting it at all.

How can I get Gena to set UserName="Default User"

Thanks!

Re: UserName Environment Variable
« Reply #1 on: July 14, 2012, 09:27:00 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
%UserName% is a variable that comes from login,
and on Gena and as on all PE, SYSTEM login and %UserName% valid

ila_rendered

I currently know only TeamViewer do not like SYSTEM login,

What is your application ?

+ maybe something else missing !!! up to your application ... (and if available sending plugin would be nice)

ps: be sure you have latest updates from server, there was an update since last package which can be related (or not)....


@All

What you think about the idea:
Adding an Administration Account, with a password (How ??)
and running such applications with runas.exe administrator.....

Well idea is in my mind for a while, but since TViewer not my priority, waiting there to be worked on, anyone interested ??

Re: UserName Environment Variable
« Reply #2 on: July 18, 2012, 12:41:10 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
If you write the entry to 'HKCU\Environment,UserName' then refresh environment variables with 'BroadcastEnvChange.exe /broadcast' you should get the %Username% variable set to something different in another command prompt. AutoIt @UserName macro still returns 'SYSTEM', though. Whether it will be enough for your application, only testing will determine.

As for Lancelot's suggestion about adding an administrator account to the PE, I have no idea how that would be done or if it is possible. JFX might have an idea.

Regards,
Galapo.

 

Powered by EzPortal