Jump to content

RunAsSet and UNC paths


Recommended Posts

Hello all! I truly did search through the forums prior to posting this, but I didn't find an answer that works with my particular issue...

I'm trying to use the RunAsSet command to execute the Office 2007 setup.exe with admin privileges - i mention this, because i've seen previous posts stating that if you are having issues running from a network UNC or mapped drive using RunAsSet, you should copy the file down to the local machine prior to execution. As this is the entire Office 2007 suite, that would be prohibitive.

I'm getting that classic error of "The directory name is invalid". Here's basically what i'm running:

RunAsSet("MyName","MyDomain","MyPassword")

Run ("\\fqnservername\install$\Microsoft\Office\Office 2007\setup.exe")

RunAsSet()

now, i've tried the RunAsSet specifying the different options (0,1,2), i've tried mapping a network drive to the specific UNC and then doing Run ("Z:\Setup.exe"), and i've verified that the credentials have domain admin rights *and* full access to the network location. and without fail, i get "The directory name is invalid". i've even included the drive mapping portion as a subset of the RunAsSet part of the script, because i know that those credentials don't have access to the same mapped network drives that the logged in user has...

I'm not much of a scripting wizard, so I'm truly sorry if this is painfully obvious, and I'm grateful for any assistance any might have. Thanks all! :)

Link to comment
Share on other sites

try the password and the username from remote pc that should do the trick

hi realkiller!

i did specify a perfectly valid local username and password on the system, but still encountered the same issue. and unfortunately, domain authentication is critical as we've purchased so many companies, we're unable to count on a uniform set of of local admin credentials on each system. :)

Link to comment
Share on other sites

I think the problem is more fundamental than your credentials!

Your run command won't work because there's a space in the path name "\\fqnservername\install$\Microsoft\Office\Office 2007\setup.exe"

The run command is trying to Run:

\\fqnservername\install$\Microsoft\Office\Office

Try

Run ('"\\fqnservername\install$\Microsoft\Office\Office 2007\setup.exe"')

That is, enclose the quoted path in single quotes (one of the features I LOVE in AutoIt!).

Link to comment
Share on other sites

I think the problem is more fundamental than your credentials!

Your run command won't work because there's a space in the path name "\\fqnservername\install$\Microsoft\Office\Office 2007\setup.exe"

The run command is trying to Run:

\\fqnservername\install$\Microsoft\Office\Office

Try

Run ('"\\fqnservername\install$\Microsoft\Office\Office 2007\setup.exe"')

That is, enclose the quoted path in single quotes (one of the features I LOVE in AutoIt!).

Jerry, if you find yourself in Chicago before I move out of state at the end of February, I owe you a beer - that led me down the right path!

Oddly enough, I thought that *might* have been an issue, so I'd originally specified "Office`1" instead of "Office 2007", but it didn't interpret that either (although that would have worked in DOS. The double-quotes didn't do it either, so I just renamed the structure to remove all spaces (thankfully, that was an option), and it worked.

Thanks for the help! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...