Deny Access To A Drive?

Feb 4, 2010

I want to deny access to a drive using vb.net code.

In folder guard software we can deny access to a drive or make a drive read only

i want to implement that function in my application

View 5 Replies


ADVERTISEMENT

Deny Force Kill Or Deny Access To The Program

Dec 18, 2010

I made an app that will dump the tasklist because rogue likes to force kill executables, is it possible to deny the rogueware's force kill when I try to open a program I made or Deny access to the program the is trying to end it, to clean the infection? I have also read from a few articles and it suggested to create a service that runs under svchosts.exe. I also read about hiding the process in task manager but I doubt that would work, is it possible to deny the rogue software from accessing the close event handler within a VB.NET application.

The reason I am working on this is we get a lot of customers in our PC shop with a lot of rogue software attacks and desktop hijacks. Since I know that the rogue software closes cmd.exe; msconfig; and notepad.exe I made a small somewhat worthless app that dumps the tasklist into a txt file on the desktop then of course knowing notepad wont open I know I can open it with a trusted application that the rogue looks forward to.."Internet explorer".

I get the file name and its path from the text file and Click Start > Run... > Taskkill /F /IM <roguename.exe> and of course the rogue software will BAM! disappear and be killed, but see I am trying to accomplish this in Normal mode and not Safe mode to Deny the rogue of closing my application. It also speeds up the removal process dramatically

View 1 Replies

MVC Authorize Attribute Deny Access / Permission

Oct 25, 2010

I'm using the Authorize() attribute to secure my controllers/actions and want to only display the Login action to unauthenticated users - or to put it another way, deny access to authenticated users. I haven't been able to find anything on the web dealing with either denying permission or allowing negative permissions (i.e., ! LoggedIn)

MVC2, .Net 4
To clarify, I want something like this:
Public Class PublicController
Inherits ControllerBase
<Authorize()> 'Only logged-in users can logout
Public Function Logout() as ActionResult
[Code] .....

View 2 Replies

Deny Unauthorized Users With An Alert Message?

Oct 16, 2010

net ,vb. I want to deny users who have not logged in with a message" you have to login to access this page".

View 1 Replies

Disable / Deny Going Back To Previous Page On Asp.net 2.0

Apr 4, 2011

On my current project I want to deny going back once my customers hit submit button and redirected to the final page. How can I deny from going back to previous page or some mechanism to expire the page if the back button is clicked. I tried this code and it didn't work.

View 2 Replies

Login Page - Deny Users Who Are Not Authenticated

Aug 31, 2011

I am new to .NET and I have created a login page, with a user Id and password. In my webconfig, I put the following code in to deny users who are not authenticated.
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="10" protection="All" />
</authentication>
<authorization>
<deny users="?"></deny>
</authorization>

What I am trying to accomplish is that when a user enters the correct information, I would like to store information small information about the user in a cookie, say for example if there an admin, manager, user, etc...Here is the code that occurs when the user click the submit button. The problem is that the page doesn't redirect to the page after user enter correct information.
If txtPassword.Text.ToLower = "test" Then
'Create a cookie
Dim cookie As New HttpCookie("UserInfo")
'Cookie variables
cookie("User") = txtUser.Text
[Code] .....

View 4 Replies

Access A Networked Drive Via Web?

Feb 4, 2010

We have around 2000 staff. Each has a shared drive to store some of their files. This shared drive points to a central location on our network.[code]...

Each user will have a folder within the root "ournetwork" labeled with their username. I do not have to worry about the directory creation as that's already done for me. These users are all tied into our AD for authentication. Folder name == AD username.

We would like the ability to allow our users to access their mapped "F" drive from outside our network through a web page. I understand that the programming involved (assuming it comes to that) will not rely on their mapped drive but rather the UNC path as posted above.

I am open to suggestions on how to get this accomplished. ASP.NET? Is there just an IIS solution like WebDAV? (although client-side WebDAV on win 7 seems to be broken, so that may be off the table).

View 1 Replies

Flash Drive As Access Key

Nov 15, 2011

how to code an administrator and non-administrator account in VB.net to authenticate a specific user account when mounting his removable device? what will we use, to provide a special key on a specific flash drive?

View 1 Replies

Restrict Drive Access?

Feb 3, 2010

I need to restict access to a drive using vb.net code

View 3 Replies

Access Pen Drive (MP3 Player) Via FileInfo?

May 13, 2009

I've got a Samsung Q1 attached to my computer, and I was hoping to use the FileInfo / DirectoryInfo objects to access the file on the device, however what I right click on a file in windows explorer I get a location of COMPUTER/Q1/DATACASTS/mine.mp3, and when I feed this into the DirectoryInfo object I get "Invalid network drive"

Something tells me I'm going about this the wrong way ... Is there a differant object I shoud use, or is my location string incorrect in format

View 1 Replies

Restrict Access To A Drive In Windows?

Feb 3, 2010

i need to restrict access to a drive in windows using vb.net

View 4 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

VS 2010 - UnauthorizedAccessException - When The Program Tries To Access The D Drive

Jan 11, 2012

I recently reformatted my computer and now that I try running a program I made beforehand, I always get an UnauthorizedAccessException when the program tries to access the D drive. How do I make it authorized? I tried changing the security settings for the D drive but that wasn't really much help.

View 1 Replies

Access File On Share Drive With Specific UserID?

Feb 12, 2010

I need to access (windows apps) the file with a specific account (file located on a share) something like this: Dim myFileInfo as FileInfo=New FileInfo(FileName) ,UserID,Password.

View 4 Replies

Access Is Denied To Copy An Exe File From Resource To A Hhd Drive?

May 17, 2012

Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

but alwys i get thie error access to the path e: is denied but the hard drive is accessable, so how i copy a fil from resource to a a disk drive like F: /

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

How To Access Network Drive Through Usual System.IO Classes

Feb 28, 2010

My software handles multiple operations on files, and I have now finished writing the related functions, using the System.IO classes. I now need to add support for network drives. Using a mapping works very well (although Directory.GetFiles is a bit low, and I don't know why), but I'd now like to be able to deal directly with paths such as \192.168.0.10Shared FolderMyDrive. Is there any way to handle this type of paths other than mounting the drive to an available drive letter, using the newly generated path, and then unmounting?

View 4 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

Read Access To Physical Drive Without Admin Rights?

Feb 20, 2012

I am trying to read some data from the MBR using CreateFile, but I cannot get it to work without admin rights. The code I am using is like this:
hDevice = CreateFile("\.PhysicalDrive0", GENERIC_READ, FILE_SHARE_READ Or FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)
Is it possible to read data from the MBR without admin rights?

View 1 Replies

Access Cryptainer Virtual Drive Projects Using Windows 7 & Net 2005?

Jan 17, 2011

I am trying to migrate from XP & Net 2005 to Windows 7 & Net 2010 My intention was to replicate net 2005 first & get projects working before installing net 2010, as I envisaged all sorts of learning tasks which I could resolve at a snaill pace whilst still being able to operate with net 2005

Stage 1 was to load 2005 on Windows 7, no problems yet.

Stage 2 open the Virtual Cryptainer drive

Stage 3 load a project ( was never a problem with XP)

Stage 4 project errors reported as not being able to access linked modules in another folder

Windows 7 seems to have more folder security/permissions than XP, so I altered as many folders being associated with the project but to no avail.By changing the virtual drive folder permissions are they amended on the drive folders (if so how would this affect going back to XP)

are the folder permissions somehow stored in the registry, which means if I restore an old virtual drive from backup, does W7 now know the permissions & apply them to the back up drive, even though those folders were never accessed in W7?By the way, anybody reading this that does not know about Cryptainer, should look at it very seriously, I now have no data files on drive C, & all my data files in the cryptainer vault are compact & virtually impossible to be opened without a password up to 100 char long!

View 3 Replies

WMI To Get Drive Letter Association With Physical Drive Path Misses CDROMs?

Feb 19, 2012

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")

[Code3]...

View 12 Replies

Finding Physical Drive Number Using Drive Letter?

Jun 16, 2009

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.

View 14 Replies

Make A Tool That Will Assign USB Pen Drive A Drive Letter?

Oct 13, 2009

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

View 4 Replies

Reading And Writing Files On External Hard Drive, Code To Ensure SQL Or Data Read/write Execution In Case Of Periodic Drive Reconnect?

Dec 18, 2010

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.

View 1 Replies

Determine If A Drive Is Local Or A Network Drive?

Dec 10, 2008

Does anyone know if there is a way to determine if a drive is local or a network drive?

View 1 Replies

Getting Physical Drive Number From Drive Letter?

Jun 17, 2009

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.

View 1 Replies

How Can Read Data From USB Flash Drive Or Pen Drive

Sep 29, 2011

USB flash drive or pen drive in vb.net...

View 14 Replies

Physical Drive Number From Drive Letter

Jun 16, 2009

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.

View 6 Replies

Permission Deny Using "del" Command Line?

Jun 23, 2009

Using "del xxx.txt" command line in vb.net on Windows, however, permission deny occurred

View 4 Replies

Make Code Which Can Make Copying A File In A Particular Drive Invalid/access Denied?

Aug 29, 2009

can we make code which can make copying a file in a particular drive invalid/access denied?

View 3 Replies







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