Solved

Mapping a Specific Drive with a RemoteApp

Posted on 2014-04-11
4
333 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
  • 2
4 Comments
 
LVL 79

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 24

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 24

Accepted Solution

by:
Coralon earned 500 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

816 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now