Sign in to follow this  
Followers 0
sab0tage

Odd RunAsSet() problem

3 posts in this topic

Hi, I've been using AutoIt for a while now. So far I've not encountered anything I've been unable to explain until now!

I have written an AutoIt application that opens iexplore with different user credentials to browse to a network share:

dim $iepath = RegRead("HKLM\SOFTWARE\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32", "")
RunAsSet($username, $domain, $password, 2)
    Run($iepath & " \\"&_GUICtrlListViewGetItemText($ListView1, $idx, 0))
RunAsSet()

Now the problem is that I get an error message when trying to run the file from one specific mapped network drive, it runs fine from all local drives, and my network home directory. I can't see why it won't work from that one network drive!

Commenting out the RunAsSet() bits launch iexplore fine, but obviously it doesn't get very far with the wrong credentials.

Any ideas what might be the cause?

Share this post


Link to post
Share on other sites



Hi, I've been using AutoIt for a while now. So far I've not encountered anything I've been unable to explain until now!

I have written an AutoIt application that opens iexplore with different user credentials to browse to a network share:

dim $iepath = RegRead("HKLM\SOFTWARE\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32", "")
RunAsSet($username, $domain, $password, 2)
    Run($iepath & " \\"&_GUICtrlListViewGetItemText($ListView1, $idx, 0))
RunAsSet()

Now the problem is that I get an error message when trying to run the file from one specific mapped network drive, it runs fine from all local drives, and my network home directory. I can't see why it won't work from that one network drive!

Commenting out the RunAsSet() bits launch iexplore fine, but obviously it doesn't get very far with the wrong credentials.

Any ideas what might be the cause?

try it with unc path, the mapped drive is for the user logged in not the admin account

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

try it with unc path, the mapped drive is for the user logged in not the admin account

Thanks for the reply.

Do you mean run my app using from a shortcut with a UNC path?

It runs fine from my home directory which is a server share mapped as H:\ the place where it won't work is also a server share, but called G:\ I don't see the difference between the two...

Share this post


Link to post
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
Sign in to follow this  
Followers 0