Modify

#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 by Valik, on May 23, 2008 at 5:04:46 AM

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 by TicketCleanup, on May 23, 2008 at 6:00:05 AM

Milestone: Future Release

Automatic ticket cleanup.

comment:3 by Valik, on May 25, 2008 at 5:35:46 AM

Milestone: 3.2.13.0
Owner: set to Valik
Resolution: Completed
Status: newclosed

Added in version: 3.2.13.0

comment:4 by Valik, on May 25, 2008 at 5:37:19 AM

Fixing mistake with resolution.

comment:5 by Valik, on May 25, 2008 at 5:37:24 AM

Resolution: Completed
Status: closedreopened

comment:6 by Valik, on May 25, 2008 at 5:37:29 AM

Resolution: Fixed
Status: reopenedclosed

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.