Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection.Cache;
using System.IO;
namespace CAE_Application
{
    public partial class frmMain : Form
    {

        public frmMain()
        {
            InitializeComponent();

        private void btnTools_Click(object sender, EventArgs e)
        {
         //Code for Network Drive access
        }
    }
}
Posted
Comments
ely_bob 17-Jul-11 19:05pm    
Are you looking to invoke system explorer on a known drive? or does the drive change?
Salmen Essridi 17-Jul-11 19:20pm    
Jeremy, can you more explain ?
jeremy1973 17-Jul-11 19:33pm    
What I am looking to do is create a tool that when I am on a users computer and I need to access company drives that have information that I need for the user computer. I want to have a tool that will allow me to access a drive on the network ether being prompted for my credentials or implementing them inside the code. ether way it would be like typing the path within the run command.Unfortunately typing the path in the run command does not work because of the user not having admin rights. So with that being said I want to create a tool that will allow me to access the network drives, I don't want to have to map them as this is not necessary. Thanks for all your help in advance.
jeremy1973 17-Jul-11 20:14pm    
There would be specific drives to each event or button click that I create. example one button would be to launch one drive and another button would be selected to launch another specified drive.

1 solution

I think this is what you are looking for:
Mapping a Drive Letter Programmatically[^]

It's a 4 page artcle - link to next page might be a bit on the tiny side ...

There are also a few articles here on CodeProject that you may find interesting:
C# File Browser[^]
My Explorer In C#[^]
File Manager using C# and Multithreading[^]

Best reagrds
Espen Harlinn
 
Share this answer
 
v2
Comments
jeremy1973 17-Jul-11 19:37pm    
Thanks for the information. This will aid in my information database, but what I was looking to do is just be able to access the drive as a one time option with admin credentials. I do a lot of admin stuff as a user and I need to be able to access these drives on the fly while working on the users computer. Thanks for all your help. It is greatly appreciated.
Espen Harlinn 18-Jul-11 5:58am    
Thanks Jeremy
Sergey Alexandrovich Kryukov 18-Jul-11 4:49am    
My 5.
--SA
Espen Harlinn 18-Jul-11 5:58am    
Thank you, Sergey!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900