I need to Poll remote machines and list the drives they have mapped along with the path(UNC) of that mapping.So far I got some code that will allow me to Poll my machine not the remote one and instead of giving me the UNC it gave me the share name which code work but is not Ideal.
-----------------code----------------------------
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
The drive is connected via USB and the problem I'm having is that, periodically, while my code is executing, the usb drive seems to disconnect and reconnect. (Nothing to do with the program, but the drive itself).I want to find a way to prevent these temporary drive reconnects from interrupting my code. IE, i want to insure that whatever read or write that is requested is actually executed even in the case of a temporary drive interruption.
I need to logon to a NAS Drive to query directory listings. All users will be logging into a domain. The NAS also has security set up on it with a different username password.
I will have a handful of users (maybe 10 - each logging into the same domain, but from different pc's) that will need to access a NAS Drive to query a directory structure. All will have physical access, and can connect via windows explorer (manually entering a user and pass).
During my first attempt via my app - I get the error "Logon failure: unknown user name or bad password" Which is good cause I only want a handful of users logging on to this drive. If I logon to the drive via Windows Explorer and then go back to the app and it works.
So what I did was create a multi form app.
- At launch the parent form loads (as well as a logon window within that form). The logon window auto fills a text box with a username. That is pulled from the current logged on user - or can be replaced. I would like each user to then enter a password -> send that to the NAS for authentication -> then either open the app (mentioned above) or give some kind of a message box saying they now have connectivity to the drive.
I have the code given below for reading and displaying all the drives on a computer.However,it does not read the NTFS mounted volume..I need the program just to read the mounted drive,
Module Module1 Sub Main() For Each drive As String In System.Environment.GetLogicalDrives()
I'm working on an app that should be able to read files from an External Hard Drive or even an iPhone or iPod. I'm a beginner so it would be great to keep it simple :) I suppose I should use the SerialPort class? But I'm not sure and I couldn't make it work.
I already have a code for detecting a removable device. However, I would like to enable my program to detect that USB drive and read and print the text in that specific text file on my webpage. I also have a program code for reading and printing a text file from a USB but that program needs the drive letter to be specified. My problem is, how would I program if the drive letter is unspecified?
Here is my code by the way, Code: <%@ Import NameSpace="System.IO" %> <%For Each d As System.IO.DriveInfo In My.Computer.FileSystem.Drives If d.DriveType = DriveType.Removable Then Dim test As String = File.ReadAllText(& ":\sample.txt") Response.Write(test) End If Next %> How to let the string test get the data so that I could put it on my page. I'm currently using that File.ReadAllText method.
My Dad made an application which had a feature that i want, basically his programme reads the users hard drive serial number and then multiplies it by say 12 and then divides it by 7 for example. This number is then shown as a 'Authorisation Code' which the user has to email to him and then his breaks it back down to the original hard drive serial number which he sends back which is the application serial number to activate it. I want to know how to read the actual hard drive serial number or a number that every computer has so i can do the same but i have searched everywhere and cannot find any examples for VB 2008 apart from one which didn't work
i need a way to open a offline registry and read the oem info from it. The registry will be from a a hdd from another pc atached to mine. What im trying to accomplish is open the offline registry and read the model/serial info on it. i am able to read the registry of the booted system but no a offline one.
How to read data, submit queries from vb application to a remote machine running sql server. note: I have created a complete functional version of a stock control system with the database residing in the local machine. I just need the basic concept of interacting with remote databases that's all. Do we have to use sockets to read/send data ?
I've been struggling for hours now to get some working code to list the share permissions of a remote share. I've got WMI code which uses win32_share which lists the shares and path and it works great. I"m now trying to add in a routine to get the share permissions as well.I've searched just about every site for some sample code and can only find some C# (I think) code.
string machine = "MachineName"; ConnectionOptions co = new ConnectionOptions(); co.Impersonation = ImpersonationLevel.Impersonate; co.EnablePrivileges = true;
I am trying to read the HKEY_USERS hive of a remote machine with this Class
Imports System.Management Imports System.Management.Instrumentation Public Enum RegHive As UInteger
[Code]....
The value of sSubKeyName is the user's SID + "" + Network (e.g. S-1-5-21-1606980848-2025429265-839522115-560021Network). Now under that key are various subkeys containing mapped drive letters. But it never returns anything.
Strangely, if I use the OpenRemoteBaseKey method it works BUT I don't want to use that because using WMI lets me specify alternate credentials and OpenRemoteBaseKey doesn't
I used sqlbulkcopy to upload huge data from local to remote. It works great.The only problem is that there is a table tClaim in which there are 50 columns. One clumn "IsUpload" do not need to upload. How to upload all columns except for this column? If I use columnmappings, do I have to code add column one by one?
I'm working on a project to replace ADO.NET data access logic using NHibernate where we're not able to map the entire domain model at once. This means we'll have domain classes with property mappings to other domain classes that aren't yet mapped with NHibernate.
Consider a Person class with an Address property (Address being a domain object without an NH mapping and Person being the class I'm mapping). How can I include Address in the Person mapping without creating an entire mapping for Address? Is it possible to call legacy (ADO.NET) data access logic from a custom PropertyAccessor? If so, is it reasonable?
*I asked this within another question here but didn't get a response. I'm hoping to get one in a more concise question.
I'm running the following WMI script to get the associations between drive letters and physical drives on the system, but for some reason it omits CDROMs/DVD-ROMs. Can someone tell me how to get those as well?
Code: ComputerName = "." Set wmiServices = GetObject _ ("winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName) Set wmiDiskDrives = wmiServices.ExecQuery _ ("SELECT DeviceID FROM Win32_DiskDrive")
I have a program that allows the user to enter a drive letter into a text box. The program then takes the letter and find the physical drive number (i.e. deviceharddisk3..). It then stripes out everything and leaves me with the number 3.
In VB6 I used mDrive.bas from vbAccelerator.com and it worked perfectly. I have been all over the internet and back and cannot find a solution written in VB.NET.
I want to make a tool that will assign a USB pen drive a drive letter, I am using WMI to acknowledge the device being plugged in, I can pull the deviceID, name, etc now I just need to work out how to assign the device to a drive and I just cant figure it out
Having successfully tried out nHibernate, I would now like to try using Fluent for mapping. My main project is in vb.net but I would really like to use c# for the mappings since the lambda expression capability makes it much cleaner. Can you have a separate project/assembly for your mapping files without creating a circular dependency with domain objects?
Having successfully tried out nHibernate, I would now like to try using Fluent for mapping. My main project is in vb.net but I would really like to use c# for the mappings since the lambda expression capability makes it much cleaner. Can you have a separate project/assembly for your mapping files without creating a circular dependency with domain objects?
I am trying to get the physical drive (device) number from the drive letter. If the user inputs the drive letter C the program will find the associated physical device number. For example if I input C then the result needs to be \Device\HardDrive1\... Some call it NT Device Name; I think. I have the code for VB6 from vbAccelerator, which works perfectly, but it does not work in VB.NET. My question is there a simple way of pulling the drive info that contains the drive letter and the physical device number. I have searched the internet and found nothing for VB.NET. I would post code but I have nothing for .NET.
I have a program I am converting from VB6 to VB.NET and I am stuck at the very last piece of code. I need to determine what physical device number is associated with the drive letter.
The program takes the drive letter from a text box and goes and finds the device number (i.e. deviceharddrive3...) and strips out everything leaving me with the devicer number; in this case the number 3. I have searched the internet to and fro and found nothing in VB.NET.
My program in VB6 uses a .bas module from vbaccelerator.com called mDrive.bas and works great. I can't figure out how to convert it over to VB.NET.
Rather than use an Entry name of an existing VPN connection, is it possible to connect to a remote network by creating a temporary connection on the fly by using the remote IP/Host name, username and password?
I want to do a small application that made the broadcast of images from a PC. The idea is to make an application of remote management but without the management part, only with the viewing of images. Anyone know any code already done or any API that helps in the project?
First off a short background of the project I am working on- I am developing a program that will be run off removable media (i.e. USB Flash drive). This will be a �virtual desktop� which you will be able to take with you and have the same �desktop� on any system. As we know drive letters can change with each host system the drive is plugged into, I need to be able to determine the path for the flash drive and access a specific folder ( i.e. My Documents)
I have an picture box(representing the icon) placed on my form (form1) and when I click the icon I want to be able to open and view the a specific folder from the portable drive. I need a click event that will determine a dynamic drive letter for a directory on the removable drive and then open that directory in an explorer window.
I am using the following code to get a list of the letters for each drive on my computer. I want to get the drive letter of CD Drive from this list. The code I am using to get list is as below:
Is it possible to check if a Logical device gathered through a WMI search request is a CD/DVD Drive? Right now, I can get the path of every Win32_LogicalDisk through WMI, but E: (for me) is my DVD drive and unless there is a disc, my program fails because it tries to count the number of folders/files on the disc.
Ultimately, I'd like to be able to tell if it is a CD/DVD drive then check to see if there is a disc there before I do anything else to it. Can it be done using WMI?
I have a function that copies files from a CD to my HDD:CopyFiles(CD_Drive, FullPath & "")
The problem is that the Drive letter "I:" is not consistent. Sometimes when I connect and disconnect external devices, the CD Drive letter changes and then my code doesn't work unless I open the project, change the letter "I" and recompile.What code can I use that will ALWAYS detect my CD Drive, regardless of the drive letter? (Like for instance, NERO will detect and burn CDs regardless of the drive letter)