Share via


Explorer.exe parameters in RemoteApps

Question

Monday, September 29, 2014 9:31 PM

I can't seem to find an answer to this question, so I apologize if it has already been answered elsewhere.  I thought it was possible to publish c:\windows\explorer.exe in Server 2012 RemoteApps and then edit the properties to pass the command parameters.

I want to open a folder on \servername\data\user1 and effectively (to use *nix verbiage) "chroot" the user to that folder.

I have passed these parameters to explorer

/e,/root "\servername\data\user1\ .  If I do this from a command prompt in Windows 7 or Windows 8, it puts me in the correct folder.  But when I do it using explorer.exe as a published app, it only opens up the user's documents folder. 

Can someone tell me if it is possible to publish explorer.exe AND force it to open a specific path? 

Using:

Windows Server 2012

Tom Davidson

All replies (4)

Thursday, October 2, 2014 7:05 PM ✅Answered

I was able to get most of what I needed done.  The trick in Windows Server 2012 R2 is not to use explorer.exe at all.  Any attempted use of explorer.exe as a published RemoteApp, no matter the parameters, resulted in having it open the user's Remote Desktop "My Computer" folder.

Instead, I created a published app for c:\Program Files\Internet Explorer\iexplore.exe .  I then edited the published app properties for iexplore.exe and in Parameters configured it to Always Use the Following Command Line Parameters and then put \servername\sharename in the blank space.

Unfortunately, this does NOT "chroot" jail the user.  I had to use standard NTFS permissions to prevent browsing folders above the UNC.  Not a huge problem, but it would be nice if there was a simple way to chroot jail a user this way.

Note: A bit of Bonus information - If you do not want the published app to have the default Internet Explorer icon, before you deploy the app on remote computers, go to this folder:

C:\Windows\RemotePackages\CPubFarms\Your Collection Name}\CPubRemoteApps

In that folder are the icons for each application you are publishing.  There will be an iexplore.ico listing.  Delete it.  Then copy in ANY standard .ico file into that folder and rename it iexplore.ico.  Then deploy your published app using RemoteApp and Desktop Connections and your user will have a listing for your shared folder.

Tom Davidson


Wednesday, October 1, 2014 3:34 AM

Hi Tom,

Thank you for posting in Windows Server Forum.

Firstly please make sure that the user has proper permission for .exe and directory. After that you can perform the following steps. 

Please publish “C:\Windows\explorer.exe” as a RemoteApp.  In the Properties of the RemoteApp select “Always use the following command-line arguments”, and enter the following argument in the box:
::{20d04fe0-3aea-1069-a2d8-08002b30309d}

Also you can create batch file and just let below command and publish that batch file as RemoteApp.

New.Bat

Explorer \Servername\sharename
Exit

Hope it helps!

Thanks.

Dharmesh Solanki

TechNet Community Support


Wednesday, October 1, 2014 6:11 PM

Dharmesh, did you actually TRY the suggestion you made to see if it answers ALL of the requirements of my request? 

Unfortunately, in Windows Server 2012 R2 (as well as in Windows 8), the ::{20d04fe0-3aea-1069-a2d8-08002b30309d} simply opens up My Computer, not the UNC I was trying to open, and using a batch file with the command c:\explorer.exe \server\share does not open anything other than the My Document folder on the local machine.  I even tried a batch file with C:\Windows\explorer.exe /e,/root \server\share and it did NOT open the \server\share folder - it opened the local Documents folder.

Others have attempted to answer this question the way you did, but I am not certain you have actually tried the answer you gave.  It doesn't work if an administrator is trying to publish explorer.exe and open a specific folder on a specific network share. At least not on Windows Server 2012 R2.

Please do not offer a solution that is not tested to actually resolve this problem.  What you suggested, as you suggested it, does not and cannot work with Server 2012 R2. 

Do NOT mark this question as answered by Dharmesh's post.  Thank you.

Tom Davidson


Friday, October 3, 2014 1:31 AM

Hi Tom,

Glad to hear that you got it working.

Thank you for sharing your experience here. It will be very beneficial for other community members who have similar questions.

If you want any more solution in future, kindly place your post in Forum.

Thanks.

Dharmesh Solanki

TechNet Community Support