Modify

Opened 11 years ago

Closed 11 years ago

#309 closed Bug (Fixed)

runas() from a network path

Reported by: cjdoyle@… Owned by: Valik
Milestone: 3.2.13.0 Component: AutoIt
Version: 3.2.12.0 Severity: None
Keywords: runas Cc:

Description

I have written a script that will elevate an uninstall process to admin credentials. This works nicely when run from a local drive. However when run from a network path, the scripts pauses.

RunAs Command line reads:

RunAs($Admin, @LogonDomain, $AdminPwd,1,@ComSpec & ' /c ' & $RemoveOld)

As I'm using the @ComSpec /c, when running from local drive the command line box appears. When running same script (absolutely no changes) from a network path, this command line box does not appear.

To get around this I have created a .cmd file that copies the script file from the network path to the local drive and run script locally. Bit of a bummer!

Attachments (0)

Change History (6)

comment:1 Changed 11 years ago by Valik

You must specify a working directory the user you're running as has access to. You don't specify one so AutoIt uses it's current working directory. Since you're running from a network path AutoIt uses that network path as the working directory for the child process. The problem is, the user doesn't have access to that directory and so the process fails to start with an access denied error. Specify a directory the user has access to as the working directory and your code will work.

comment:2 Changed 11 years ago by TicketCleanup

  • Milestone Future Release deleted

Automatic ticket cleanup.

comment:3 Changed 11 years ago by Valik

  • Milestone set to 3.2.13.0
  • Owner set to Valik
  • Resolution set to Completed
  • Status changed from new to closed

Added in version: 3.2.13.0

comment:4 Changed 11 years ago by Valik

Fixing mistake with resolution.

comment:5 Changed 11 years ago by Valik

  • Resolution Completed deleted
  • Status changed from closed to reopened

comment:6 Changed 11 years ago by Valik

  • Resolution set to Fixed
  • Status changed from reopened to closed

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.