Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#89 closed Bug (Fixed)

RunAs w/ Profile does not grant acess to user environment

Reported by: DaveF Owned by: Valik
Milestone: 3.2.11.12 Component: AutoIt
Version: 3.2.11.0 Severity: Blocking
Keywords: beta, runas, environment, profile Cc:

Description

Using beta 3.2.11.0 on XP SP2:

In a child process spawned by the RunAs function with the proper flag to force the as-yet unloaded run-as user's profile to load, the child process's environment is that of the Default User rather than the run-as user's, though the other run-as elements of the run-as user's profile (such as the system registry) can be accessed as desired.

Code to reproduce:

; declare yourself
Dim $ourPID, $ourRead
; Run child task with option to load run-as user's profile
$ourPID = RunAs("is", @ComputerName, "smack", 1, @ComSpec & " /c set", @SystemDir, @SW_HIDE, 2)
; Read the child task's STDOUT output
While 1
  $ourRead &= StdoutRead($ourPID)
  If @error Then ExitLoop
WEnd
; Display result
MsgBox(0, "Debug", @AutoItVersion & " yields:" & @CRLF & $ourRead)

Attachments (0)

Change History (4)

comment:1 Changed 17 years ago by Valik

  • Milestone Future Release deleted
  • Owner set to Valik
  • Status changed from new to assigned

Ahhh hell, good catch, Dave. I see what the problem is.

Note to self: Document that the profile *must* be loaded in order to get environment variables specified in the profile, otherwise a bare-bones environment will be loaded.

comment:2 Changed 17 years ago by Jpm

  • Severity set to Blocking

comment:3 Changed 17 years ago by Valik

  • Milestone set to 3.2.11.11
  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed in version: 3.2.11.11

comment:4 Changed 17 years ago by Valik

  • Milestone changed from 3.2.11.11 to 3.2.11.12

Fixed in version: 3.2.11.12

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.