• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13132
  • Last Modified:

How to map network drive for RemoteApp in terminal server 2008

Hi,

I can't find a way to connect to a mapped network drive within a RemoteApp.

I have a RemoteApp set up for Microsoft Access connecting to Microsoft Terminal Server 2008 VM that uses an SQL database running on a Microsoft SBS 2008 premium VM. The RemoteApp works fine and the database performs nicely but the problem is that the database needs to attach forms from a network share.

I've setup a user called 'apps' and created a logon script to net use the shared drive. If I log into the TS via RDC the script connects the mapped network drive and the database can access forms fine but I want to run the application as a RemoteApp only and in doing this the script doesn't run so the mapped drive doesn't exist.

If anyone knows a way to attached a mapped drive to a RemoteApp it would be greatly appreciated.

Cheers!
0
trippa666au
Asked:
trippa666au
  • 6
  • 3
  • 2
  • +2
2 Solutions
 
Kruno DžoićSystem EngineerCommented:
Do you running RemoteApp only form one PC or ?

Where in RemoteApp do you command app to connect on mappeed drive ?
0
 
trippa666auAuthor Commented:
Yes just one remote PC via VPN. Can't find anywhere to run a command I've only tried logon script without success
0
 
Kruno DžoićSystem EngineerCommented:
create batch file ( to create mapped drive, and then start app )

in first row put something like this

net use r: \\IP_server_address\share_path  
c:\path_to_app.exe    


http://www.cezeo.com/tips-and-tricks/net-use-command/

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
trippa666auAuthor Commented:
The user is in a local profile joined to the domain and they have mapped shares within their profile to the SBS 2008 VM where the resources are.

The RemoteApp is hosted on the T/S and because it's only the application itself that authenticates with the DC a user profile isn't loaded so a net use bat file (or logon script that I've already tried) isn't initialised.

So the user can browse the exact shares via windows explorer that the RemoteApp can't access from the TS where it's hosted
0
 
trippa666auAuthor Commented:
Can anyone help with this?
0
 
lamaslanyCommented:
@trippa666au:  I am not sure you have understood what M3rc74 was suggesting.  This script is *not* a 'login' script - rather it is the 'application' that gets run when the RemoteApp is launched.

Rather than launching the application directly the 'RemoteApp' would the the script file "remoteapp.cmd".  When the RemoteApp is started it'll run the script which maps the drive and starts the actual application.  

0
 
trippa666auAuthor Commented:
I'm not sure I understand how to do this. If I make a script file on the TS to map a drive then to run the remoteapp, it still maps the drive in the local user profile not on the TS host. The remoteapp doesn't use local mapped drive resources because it is running on the host.

I can't find anywhere to set a command in the remoteapp to map a network drive all you can do is set custom RDP settings. If iI'm not understanding can you explain how to do this?
0
 
lamaslanyCommented:
"If I make a script file on the TS to map a drive then to run the remoteapp, it still maps the drive in the local user profile not on the TS host. The remoteapp doesn't use local mapped drive resources because it is running on the host."

When you say it 'maps the drive in the local user profile' do you mean that the script maps the drive on the local (client) machine?
0
 
trippa666auAuthor Commented:
Yes. I've created a Remoteapp of the script but it still only maps a drive on the local client machine. Maybe this is impossible to do...
0
 
lamaslanyCommented:
Are you *sure* that the script is being executed on the terminal server (TS)?  


I have just tested the following (albeit trivial) example:

On the TS I created a folder on the C: drive named TEST.  
On the TS, in that folder, I created a new text file named: map_and_launch.cmd
On the TS I opened the file C:\TEST\map_and_launch.cmd in notepad and type the following:

net use U: \\Server\Share\%username%
notepad U:\testfile.txt

Open in new window

Obviously your drive letter/UNC path would be different...

I then closed notepad saving the changes.


On the TS I opened the RemoteApp manager and:
Clicked 'Add RemoteApp Programs'
Clicked Next
Clicked Browse
Browsed to the file C:\TEST\map_and_launch.cmd
Clicked Open
Clicked Next
Clicked Finish



From the client machine I logged into RD Web Access and launched the RemoteApp.

The script ran and opened notepad.  Using the open/save dialogs in notepad I was able to confirm that the drive had been mapped in the RemoteApp session and had not mapped it as a drive on the local machine.




0
 
QlemoC++ DeveloperCommented:
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
upalakshithaCommented:
you can use group policy preference user config drive mapping to map a share.
0
 
upalakshithaCommented:
if you put a feed back whether the issue was resolved?
drive mapping is possible with remoteapps.
0
 
trippa666auAuthor Commented:
Sorry can I award points on this. I tried but said it was not possibe
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 6
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now