473,388 Members | 919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Map a Drive Programmatically

From a console app, I'd like to map a drive from one Win2K3 server to
another. I'm familiar with the [Net Use...] command line syntax, and I can
put it in a batch file and call the batch file from the console app. That
will work - but I was wondering if I could do it all in my C# code (i.e.,
without having to call a separate batch file).

Thanks!
Jul 21 '05 #1
1 3147
Verde,

Check this out - http://www.codeproject.com/csharp/mapnetdrive.asp

Hope this will work for you.

Best wishes,

Philip.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
4
by: GregT | last post by:
Is there a way to programmatically identify a local CD drive/drives from a local machine. Currently, I am calling System.IO.Directory.GetLogicalDrives() - but this lists all the drives on the...
0
by: Rob | last post by:
Hi, Does anyone know of a good reference for mapping a network drive programmatically using VB.Net? Is it best to use API calls or is there a better way to do it? Thanks Rob
8
by: dantan98 | last post by:
Hello all... Please don't ask me why, but I am currently tasked to somehow discover when the hard drive is being accessed (for reads and writes). All of the searching I have done has been...
2
by: Chad | last post by:
I am in the process of writing an application that detects the insertion of a pen drive, and if a specific folder structure exists, it shows a form containing data. The problem is that when I...
1
by: maz01 | last post by:
Hello All, I am developing an application in visual basic 2005 that will run continuously in the background on a users workstation. This application will automatically transfer files from the...
1
by: Bill Nguyen | last post by:
One of my apps (running in a terminal server session) needs to access a local USB drive /fash card. Is there a way to access local drives programmatically? Thanks Bill
1
by: Sony Kalkan | last post by:
Hi, I want to unlock the drive programmatically ? is there an api function related to it. For instance, when i run chkdsk with /F parameter, i get "drive in use" error . I want to unlock drive...
5
by: Phil | last post by:
A file used by my application may be stored on a shared network drive, so that it can be accessed by different people using the same application. I have written some code that uses an...
4
by: vbshanes | last post by:
We use Samba on a SCO Unix box as our file server / backup device. I have a directory mapped as a Windows drive. I read / write files from this remote drive with my VB,net application. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.