Sign in to follow this  
Followers 0
Sibilant

Running explorer under admin credentials

7 posts in this topic

#1 ·  Posted (edited)

I've searched the forums and I couldn't find any solutions to my problem so I'm looking for help with my current scenario. :)

I'm on a client's computer and the person whose logged in is using User level credentials. I need to go to our installation repository on the network. Only IT has credentials to open this folder. My work around used to be right clicking on Internet Explorer 6, doing a runas domain admin and then use it like I would explorer by typing in the network location in the address bar. I cannot do that with IE7 and we're going to be upgrading soon. I'm trying to figure out how to traverse the network with different credential. My goal is to avoid loggin out the current user and then logging back in as a domain admin.

Any help or suggestions would be greatly appreciated. Thanks!

Edited by Sibilant

Share this post


Link to post
Share on other sites



Search the help for RunAsSet()

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Search the help for RunAsSet()

Thanks for the quick response. The runas with the right click and the RunAsSet in au3 will not spawn windows explorer in windows xp with different credentials. My dilemma isn't necessarily the credentials, its the explorer or some other means.

Edited by Sibilant

Share this post


Link to post
Share on other sites

This is what I found on the web.

Have you ever tried to use RunAs to start a new instance of Windows Explorer--with no result, even though you provided the correct credentials? This glitch happens because by default, RunAs first determines whether an instance of Windows Explorer is already running on the system--which is always the case. Therefore, RunAs passes the request to the existing Windows Explorer process instead of starting a new one. You can resolve this issue by selecting Tools, Folder Options from the Windows Explorer menu bar, going to the View tab, and selecting the Launch folder windows in a separate process check box. You can also change the setting directly in the registry, by setting the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced registry subkey's SeparateProcess REG_DWORD value to 1.

Share this post


Link to post
Share on other sites

This is what I found on the web.

That did the trick. Sincere thanks!

Share this post


Link to post
Share on other sites

Weird. I couldn't get it to work. Personally, I would have tried RunAsSet'ing an AutoIt script with a FileOpenDialog() in it. Can't say if it would work or not, but it's what I would have tried.

Share this post


Link to post
Share on other sites

My suggestion is to use what AutoIt Offers. IF you want to connect to some network share with diffrent credentials then currently used use DriveMapAdd command. You can not only use it for drive mapping but just for making connection with diffrent credentials. For example:

Local $Lotus_Notes_Share = "\Lotus$"
    Local $Lotus_Notes_Binary = "\Lotus$\notes\LN701PL\setup.exe"
    Local $Lotus_Notes_Full_Binary_Path = "\\" & $CurrentServer & $Lotus_Notes_Binary
    Opt("RunErrorsFatal", 0)
    DriveMapAdd("","\\" & $CurrentServer & $Lotus_Notes_Share,0,$domain_name & "\" & $domain_login ,$domain_password)
    If FileExists($Lotus_Notes_Full_Binary_Path) Then
        RunWait($Lotus_Notes_Full_Binary_Path)
        If @error = 1 Then 
            Exit
        EndIf
    Else
        Exit        
    EndIf
    DriveMapDel("\\" & $CurrentServer & $Lotus_Notes_Share)

Keep in mind. It doesn't MAP the drive to any letter. It just sets up connection to SERVER with diffrent credentials then current user. It's documented but no explanation/example is given.

The device to map, for example "O:" or "LPT1:". If you pass a blank string for this parameter a connection is made but not mapped to a specific drive. If you specify "*" an unused drive letter will be automatically selected.


My little company: Evotec (PL version: Evotec)

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