WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Run Explorer in a Different Security Context

 Keywords:  Run Launch Explorer Different Security Context Account Admin Administrator

Question:

I am would like to launch the Windows Explorer using the Admin user account, when logged in as a standard user.

http://blogs.msdn.com/b/aaron_margosis/archive/2004/07/07/175488.aspx

How can I accomplish this in WinBatch?

Answer:

The trick is to set the folder option to “Launch folder windows in a separate process”. This is a per-user option, off by default, that needs to be set for the target user account. That is, if you want to use RunAs to start explorer.exe as MyAdminAccount, then MyAdminAccount needs to have the “separate process” option set. Once this flag has been set, you can start explorer.exe with RunWithLogon.
logonflags = 1  ; Must set the logon-flags to 1.
RunWithLogon(`explorer.exe`, `"\\fs\root\depts"`, ``, @NORMAL, @NOWAIT, username, domain_name, pswd,logonflags )

Article ID:   W17946
Filename:   Run Explorer in a Different Security Context.txt
File Created: 2010:05:28:14:35:44
Last Updated: 2010:05:28:14:35:44