Enter Password For Mapped Drive?

Feb 4, 2010

I have an application that sends files to a Network drive that has been mapped as the "Z:" drive. When code first runs, it errors with "path cannot be found". Then if you open up MyComputer, and double click on the drive, windows asks you for UserName/Password. Once entered, if you run the code again, everything is fine.

So it looks like it cant find the drive b/c a username/password has not "unlocked" the drive yet.

How do I get vb to unlock the drive so I may transfer the file?

I found some stuff online but it seems like it self maps the drive. I'm just looking at applying the username/password to the mapped drive so I may copy.

View 1 Replies


ADVERTISEMENT

Checking For Mapped Drive?

Dec 17, 2009

I am having problems verifying that the drive is mapped. The code I have is this:For the Public Class I have this:

Dim wshNet As New IWshRuntimeLibrary.WshNetwork

wshNet.MapNetworkDrive("Z:", "\\10.21.2.218\Share", True, "wecon\sophosuser", "soweco")

To remove the drive I am using:

'wshNet.RemoveNetworkDrive ("Z:\", False, False)

What I am looking for is how to verify that the z drive is mapped, and if so then run the unmapping drive command.When I try to use a if wshNet. anything the stupid thing won't return a true or false value?I searched all through the net to find some sort of If drive mapped = true, however nothing comes up that I can implement.

View 3 Replies

Copying From Mapped Drive?

Jun 30, 2009

I read about the UNC path, but that doesn't seem to be making much difference, it may be that I need a user name and password for the connection, can anyone demonstrate code that allows username and password entry so that a file can copy to and from a mapped network drive or the UNC is "\serverarchiveJune"

View 1 Replies

Get / Set A Mapped Network Drive Label

Apr 4, 2009

I am working on a win application that maps/unmaps network drives. And i have a couple of problems getting and setting a mapped network drive's label /name. The driveinfo volumelabel property will get or set the label of the remote drive/folder, what i need is the mapped network drive name/label on the local system. it then adds the driveletter, volumelabel, and connection state to a listview.

[Code]....

View 1 Replies

Getting Address Of A Mapped Network Drive

Mar 28, 2010

my first question on this board. I'm creating a media player(Like so many others). I try playing files over my network. When I pass this address "M:songssome artistsome song.mp3" to the windows media player control it actually opens "\ServerMEDIAsome artistsome song.mp3". But when my program checks if it is playing the correct song it thinks it is not, because the strings aren't equal. Is there a way in VB to get the network address of a mapped network drive? I can already see that it is a network drive but not wich address it points to.

View 2 Replies

Testing Mapped Drive And Reconnect It?

Oct 13, 2011

I have a Little .NET 4 application that starts a portable exe on a mapped drive.But when I'm on my laptop I need to establish a VPN connection before I can access the mapped drive.After establishing VPN connection, the mapped drive is still in disconnected state and my program can't access the exe.Is there som way I can make my program try to reconnect the mapped drive before it acceesses it?

View 2 Replies

VS 2010 Mapped Drive Access?

Jan 5, 2012

I am trying to run a visual studio 2010 app from a windows 2003 server machine that writes xml files to a folder stored on a remote windows 2008 server. I mapped the server drive and can access the folder manually but in the code the 'access is denied' error is hit when the file path declaration is hit for that 2008 server folder. I checked the access writes to that folder and made sure it is shared for that user. Also the user I am logged into on the source server has admin rights so should it not be able to access the mapped drive through the application?How do I grant my app access to that or any folder on that drive on the remote server? I had this issue before but cannot remember what I did to clear this up.

View 1 Replies

C# - Determine A Mapped Drive's Actual Path?

Jan 14, 2010

How do I determine a mapped drive's actual path?

So if I have a mapped drive on a machine called "Z" how can I using .NET determine the machine and path for the mapped folder?

The code can assume it's running on the machine with the mapped drive.

I looked at Path, Directory, FileInfo objects, but can't seem to find anything.

I also looked for existing questions, but could not find what I'm looking for.

View 8 Replies

Change The Path For A Network Drive Already Mapped?

Sep 16, 2009

We are getting a new server and we already have a Z: drive mapped, and we want to use the same letter and just change the path without touching all machines. I am looking for a simple VBscript to do that. I have one that will remove and one that will add, but I need to have on script.

View 1 Replies

Check If A Network Drive Is Mapped Persistently?

Oct 18, 2009

I use the following code to layout network drives on a system. I want to add a third column for persistence but in vb.net I do not know how to check if a drive has a persistent map or not.

For Each drive_info As DriveInfo In DriveInfo.GetDrives()
If drive_info.DriveType().ToString = "Network" Then
With maps.Items.Add(drive_info.Name)

[code]......

View 2 Replies

VS 2008 Get Path Of Mapped Network Drive?

Dec 23, 2009

I was expecting this to be easy but it seems that it is not... all I want to do is loop through all drives on a computer and if the drive is a network drive then get the UNC path that this network drive maps to. Simples. I was expecting to just do this:

vb.net
For Each drv In IO.DriveInfo.GetDrives()
If drv.DriveType = IO.DriveType.Network Then
MessageBox.Show(drv.RootDirectory.ToString)
End If
Next

[Code]...

View 10 Replies

Write To A Mapped Network Share Drive?

Sep 21, 2011

I spent quite awhile trying to figure this out and not one single combination of path strings let this happen.

I usually error'd with the path is not found, part of the path could not be found, or wrong user name and password.

All I am using is the <asp:fileupload>.

View 2 Replies

DB/Reporting :: Can't Open Access Database On Mapped Drive

Dec 8, 2008

I can't open an Access database on a mapped drive. However it works if I use the UNC path. how I can get this to work? See the code below for an example of what works and what doesn't...

Code:
mConnString = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=\tiger-2000dvb_mt7MTrackBE.mdb" ' This works
mConnString = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=T:vb_mt7MTrackBE.mdb" ' this does not work
Dim objConn As New OleDbConnection(mConnString)

[code].....

The error message I receive is...'T:vb_mt7MTrackBE.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.I've done the obvious and verified that t:vb_mt7MtrackBE.mdb is a valid path.

View 3 Replies

Mysteriously Lost Access To A Mapped Network Drive?

Aug 5, 2009

I had a basic text file reader/writer program that wrote and read from a mapped, shared drive up and running for a couple weeks. I wanted to add just a couple more things that shouldn't have effected the program (the ability to write another text file), and now the program can't find the shared drive. The error I get is: Could not find file '<file location>' with <file location> filled in with either the mapped name of the drive (X:) or the unmapped name (\servercomputer). Both are copied directly from windows explorer, so I know the path is right. I'm a bit of a beginner, but I'm pretty sure that all the required permissions are in place, and all users have access to this drive.

To further complicate things, it is not consistant. Some commands appear to have no trouble reading off the mapped name, but don't read the unmapped name, and vice versa. Others won't take either. Sometimes the code will execute perfectly up to the middle of the code (accessing the shared drive a couple times), and then it will give this error. If anyone could point me in the right direction,

View 1 Replies

Create Code For Getting The Universal Naming Convention For Mapped Drive In VB6?

Jun 13, 2008

I have run across exam ples of how to create code for getting the universal naming convention for mapped drive in VB6 and access but that don't work in VB net.

View 4 Replies

Unable To Run Batch File Located On Mapped Network Drive?

Nov 29, 2011

I am unable to run batch file that is located in mapped network drive using System.Diagnostics.Process in VB.Net. I get:'<batchfilename>.bat' is not recognized as an internal or external command, operable program or batch file.Press any key to continue..I get the same error when navigate to the folder (using explorer) that contains this batch file and double click it. I can successfully run the batch file by changing the directory to that folder through command prompt. I can't figure out why this is happening. I think the problem is Start() function of Process works like double click rather than just run the batch file.

[Code]...

View 1 Replies

Open File Dialog Not Showing Network Locations And Mapped Drive?

Jun 3, 2009

I am doing setup project in VS 2008. I used custom action to select file from local drives.On the button click of custom action form, I am launching Open file dialog...asofdGetNetPath.ShowDialogWhen I run the setup on Vista, and click the button to open the openFileDialog, it hanged, form becomes non responsive and I have to cancel the setup.on debugging I got following error"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your main function has STAThreadAttribute marked in it. This exception is only raised if a debugger is attached to the process."

View 2 Replies

Loop Through Top Level Folder In Mapped Drive And Give Total Count Of Files And Total?

Oct 28, 2008

I am working with VB 2008. I want to be able to run this program say in N: and it will show me in an excel sheet the following:

Folder Path Size(GB) Count of Files
N:Clients 0.53 308

where clients contains subfolders and files and the size is the total of all those files within each folder and the count is the total within each folder also.

This works fine as it is but i have to select one by one the top level folders and some of them are huge so it takes forever to give me an answer.

1) I would like to see in my spreadsheet the following by only select the network drive n:

Folder Path Size(GB) Count of Files
N:Clients 0.53 308
N:Software 10.7 15430
N:Billing 0.98 105

2) I would also like to know if this is the faster method.

3) I tried adding a progress bar so that the user can have an idea of how much this will take but i had to remove because it was not working.

4) I would like to see the folder name, size of folder and count of files in the listview.

Here is the code:

Imports Microsoft
Imports Microsoft.Win32
Imports Microsoft.Win32.Registry
Imports System.Collections

[code].....

View 5 Replies

Create A Function To Convert A Mapped Drive Path To A UNC Path?

Apr 7, 2009

I am trying to create a function to convert a mapped drive path to a UNC path. I did some googling and found several different pages on the matter. I am most interested in the first one, but I cannot seem to get the code to cooperate. Since the original post was in C#, here is my VB.NET conversion:

[Code]...

View 1 Replies

VS 2008 Computer Restarts And Mapped Drive Appears Under My Computer?

Mar 31, 2009

Problem:When my computer restarts my mapped drive appears under My Computer. When I try to use it from code I get errors. If I open the mapped drive by double clicking it, and then try the code, it works. What I discovered is that when my computer starts the status, using net use, is

[code]...

View 5 Replies

Get File Size Of File On Mapped Network Drive?

Aug 11, 2011

I was using the following code to check the file size of a data file on my local machine. Now the data files have been moved to a mapped network drive and this code no longer works. What do I need to change or how do I access file size on a mapped drive?

Dim MyFile As New FileInfo(MyFilePath)
Dim FileSize As Long = MyFile.Length

View 12 Replies

How To Map Network Drive That Requires Username And Password

Jul 7, 2010

I need to map a network drive from within a .NET application. I'm going to need to use an AD Username and Password to authenticate. Usually I just use a batch file with the net use command. How do I do this from within C# or VB.NET code?

View 4 Replies

Mapping A Network Drive Using Username And Password

Jan 18, 2009

I'd like to write a VB script that maps a network drive, but I don't really know where to start. I'd like to script to ask for a username and password, then map the drive.should I write it VB or as a CMD batch file? NET USE Z: \serverfolder\%user% /USER:%USER%@domain /password:%pass%am not even sure I've got that syntax write.

View 5 Replies

Password Protect External Hard Drive?

Oct 27, 2010

I'm interested in password protecting my external hard-drive. i know there is already programs that can do this but i want to make my own.

make a program that would at start-up pop up and make the user put the password if not then the partition will be set to hidden. also would be a good idea to set the partition hidden until user puts password.

View 1 Replies

Password Protect Flash Drive In VB 2008?

Feb 8, 2010

lately, ive had a lot of free time and have been trying to password protect my flash drive in VB 2008. and ive figured out almost everything i want with it, but ive come to a bit of a roadblock. as of right now, ive got 2 accounts, but thats all ive done so far, because every account has like 3 if statements, and it would start to accumulate a bit of i made anymore. so, ive been looking into using a database, and having it retrieve the password and username from there. ive searched for hours, and have found a lot of little bits and pieces of code, but nothing that would work for my situation. Will somebody tell me how i would:

1: make sure that the password and username match in the database when i click the confirm button
2: add a new username and password to a database when they want to make their own account
3: save changes to the database when i log out and move to another computer

also, is there a simple way to log the date, time, IP address, and Username, put it in a text file, and email it to me? i would also like to know how to open a flash drive using its name, and not its letter, cause its a different drive letter on different computers.

View 15 Replies

USB Drive: Set Bootable, Lock/Password Protect Folders?

Jan 7, 2011

is it possible to set pen drive as boot device through vb.net

View 9 Replies

VS 2010 Security Dongle - Save The Password (md5 Encrypted ) On A Flash Drive?

Sep 15, 2011

i am having a mysql database that is having a password. so i am using it to login to the program. Is there a way to save the password (md5 encrypted i can do this) on a flash drive so i can access it from the program but the user can't access it.

View 17 Replies

Force Users To Enter A Username And Password?

Dec 9, 2010

When I originally set up my project I 'hard-coded' my username and password in so that I could access a remote DB2 database. Now that I need to publish it to other users they need to be prompted for their own usernames and passwords. I've gone to "My Project/Settings" and deleted the items from the string - but when I run I get the following message on the statement:

Me.BATCHTableAdapter.Fill(Me.DB1DataSet.BATCH)
ERROR [08001] [IBM] SQL30082N Security processing failed with reason "3" ("PASSWORD MISSING"). SQLSTATE=08001

The settings are as follows (before I delete the userid and password):

Name:DB1ConnectionString
Type:(Connection string)
Scope:Application
Value:Database=DB1;Server=99.999.999.99:446;userid=myuser;password=mypassword;Persist Security Info=True;

The question is what do I have to do to make it forget my userid and password - and always prompt the user for both when running up?

View 1 Replies

Enter Right Username And Password Then Check Right Radio Button

May 16, 2009

So far i have a normal login system but want to add 3 radio buttons.you have to enter the right username and password then check the right radio button..

View 5 Replies

VS 2010 Console App - Enter Password And Display Text

Nov 12, 2010

I'm making a console app that uses your name and then asks for a password and displays the text. So the start is like this

18:36:01 [Info] Program is started.
18:36:01 [Info] Please enter your name.
NAME GOES HERE AND THEN ENTER TO PROCEED
18:36:04 [Info] Hello Xoslize, Please enter the password.
Password Goes Here and then Enter to Proceed
Some Text Goes Here

How do I do that? I mean the enter to type text, etc. Btw, how about using color on every word?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved