TC doesn't set its environments for program runs as admin

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

TC doesn't set its environments for program runs as admin

Post by *ts4242 »

When running a program as administrator from TC, TC doesn't set its environments for that program. You can test with this program

Is it bug, feature or limitation?

TC 7.50a / Windows 7 ultimate
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

The help for the cmd.exe RunAs command:

Code: Select all

RUNAS [/profile] [/env] [/netonly] /user:<UserName> program

   /profile        if the user's profile needs to be loaded
   /env            to use current environment instead of user's.
   /netonly        use if the credentials specified are for remote access only.
   /user           <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   program         command line for EXE.  See below for examples
With RunAs you need to specify you want to use the current environment -- just like a normal launch of a program would do.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2Balderstrom

I'm using "Run As Administrator" from the context menu and I was expecting TC pass its environments
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

The Context Menu "Run As Administrator" is not TC (AFAIK) -- now if it is, that would be good to know, since I should be running Win7 early next year.

MVV has written Sudo.exe and another TC user indicated a similiar program as well as RunAs available in Win2K/XP. If TC had some internal RunAs Admin implementation there would be little need for any of that.

PS: Aside from TcmAdmin.exe, which can only be used by TC for File Operations.
Last edited by Balderstrom on 2009-12-07, 10:16 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ts4242 wrote:2Balderstrom

I'm using "Run As Administrator" from the context menu and I was expecting TC pass its environments
TC can't choose what to pass or not when you use "Run As Admin", its all Windows. BTW, did you notice that if you start CMD using "Run As Admin", its start path is always Windows\System32? Its all dumb Windows:)
Post Reply