Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mapping a Specific Drive with a RemoteApp

Posted on 2014-04-11
4
Medium Priority
?
369 Views
Last Modified: 2014-08-07
Hi, we have a remoteapp (windows 2008 R2) that users have on their desktop. As expected users click the remoteapp rdp icon and the app opens seamlessly on their PC desktop.

The app comes in two flavours (one for company A and one for company B) and both apps require the O drive to be mapped on the terminal server profile itself (not locally but on the terminal server session / profile), but for company A the O maps to share \share_one and for company B the O drive needs to map to \share_two. Basically O drive but different share names. It's all to do with how the application works and this cant be changed.

The problem we have is that if a user needs to use both apps, when she clicks the second one the O drive is still mapped to the old mapping and the second program errors.

Is there a good way to get a remoteapp to map a drive on the TS before it runs the program. So that if the user (who will still be logged on to the terminal server) comes out, clicks the second app will then get the correct drive re-mapped?

I understand about redirecting drives amd GPOs but that doesn't give the ability to map a specific drive each time a remoteapp is run.
0
Comment
Question by:Lee Pepper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Expert Comment

by:David Johnson, CD, MVP
ID: 39995646
Wouldn't the easiest thing to do is use separate mapped drives for each instance of yourapp i.e. yourapp-company1 and yourapp-company2
0
 
LVL 25

Expert Comment

by:Coralon
ID: 39995691
It depends on how you determine who runs which version.
But, ultimately, you'll want to use some sort of wrapper script for your remote app.

I can think of several different ways to handle this based on who is doing what, and they all tie into using a script to do this, and what your security requirements are.

As an example batch file:
@echo off

:Begin
if exist o:\nul net use o: /d
if exist o:\nul subst i: /d

choice /c ABQ /m "Press A for Company A, Press B for Company B, Press Q to quit"
if %ERRORLEVEL% == 3 goto Quit
if %ERRORLEVEL% == 2 goto CompanyB

:CompanyA
net use o: \\server\share1
call "<path>\myapp.exe"

goto Begin

:CompanyB
net use o: \\server\share2
call "<path>\myapp.exe"

goto Begin

:Quit

Open in new window


You would publish your app as cmd.exe /c wrapperscript.cmd

It's also easy to write similar things in any number of scripting languages.  If your users need to be locked down to a single version, you'd publish 3 copies of your app.. one for Company A, one for Company B, and one that gives them the choice.

The key is forcing to map the o: drive immediately before launching the application.

Coralon
0
 

Author Comment

by:Lee Pepper
ID: 39998673
Thank you for this Coralon!

On the RemoteApp Manager program, you have to specify both a path and then arguments. When I come to call the application from the script, how do I add those arguments in.

So for example, on our app there is:

Path: D:\application\application.exe
Arguments: "D:\application\application.exe" =baskey "INI" -ininame etc etc and it goes on for a bit....

Thanks
0
 
LVL 25

Accepted Solution

by:
Coralon earned 1500 total points
ID: 40000528
You would just modify the command lines where they are called.  

On each of those CALL lines, you will put the full path for each command.
call d:\application.exe =baskey "INI" -ininame ....

Open in new window


If this works for you, then great, if not, I can put something else together easily enough.. there are *tons* of ways to do this in a wrapper script.  

And always glad to help!

Coralon
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Like many organizations, your foray into cloud computing may have started with an ancillary or security service, like email spam and virus protection. For some, the first or second step into the cloud was moving email off-premise. For others, a clou…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question