Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Identifying Drives

Posted on 2011-03-15
5
Medium Priority
?
655 Views
Last Modified: 2012-05-11
I have a vb6 application that runs on a remote desktop server.

I need to create a utility so the user can copy files back and forth from their local computer to the remote desktop server.

The users do not have access to the servers My Computer which shows both the users local and the remote desktop server’s drives.

If I use the vb6 DriveListBox it does not show the users local drives.  How can I detect these drives?
0
Comment
Question by:PhilChapmanJr
[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
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:kbirecki
ID: 35142537
If rdp is configured to map client drives, your app could use those drive letters.  Would that work?
0
 
LVL 2

Author Comment

by:PhilChapmanJr
ID: 35142632
it's is configured to to map client dirves.  But how can i dentify the drive so I can copy files to and from it.

See screen show attached which shows how the drives look in My-Computer
Drives.jpg
0
 
LVL 11

Accepted Solution

by:
kbirecki earned 2000 total points
ID: 35143607
If you want something to be generic, meaning you won't know what local client drives are available from within the RDP session, you'll have to do some discovery, such as this example: http://vbcity.com/forums/t/4311.aspx.

Or, if you know you'll always have a C: drive on the client, you can (temporarily or not) map a drive to the client system.  In DOS, you would do it like this: net use K: \\%clientname%\c$.  It is essentially mapping a share from the client (acting as a server.)

For a VB6 app, there's lot's of examples of how to do this.  Here's one:  http://www.vbforums.com/showthread.php?t=373004.  You'll just need to pick up the environment variable %clientname% to use as the server, and assume "C$" as the share.  This assumes the user in the RDP session has permissions to access the administrative share on the local computer (this is not the same as a non-administrative share, or a typical share you'd create by opening the Share properties of a drive or folder.)  You could also explicitly add a local share with limited rights.

Hope that helps.
0
 
LVL 2

Author Comment

by:PhilChapmanJr
ID: 35143682
I copied the path from MyComputer which is "\\tsclient\C\" for C: drive of the local computer and it works ok with DirListBox

Dir_B.Path = "\\tsclient\C\"
Dir_B.Refresh
DoEvents
File_B.Path = Dir_B.Path
File_B.Refresh

Thanks for the help thought
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 35143690
Glad you got it working!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 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