arul

arul

  • NA
  • 26
  • 0

Map Drive For Users

Dec 12 2007 7:19 AM

How can i map a drive to login user account.Already My PC is mapped this same drive.But i need to map this M: drive to particular windows logged user.am using c# windows application.
I have  this VB code.its working fine in VB ? how can i convert it frm vb to c# ?

Set WshNetwork = CreateObject("WScript.Network")
If Not fso.DriveExists("M:") Then
    WshNetwork.MapNetworkdrive "M:", "\\" & Environ$("EK_ComServer") & "\Apps$"
End If
Set WshNetwork = Nothing

 

Thanks and regards
Arul.