VS 2008 - How To Edit Share Permissions (not NTFS)

Jul 8, 2009

I need to build an app that can create a network share and give it full read/write permissions to everyone.
I have this code to create/delete network shares: [Code] But it only changes the NTFS permissions, not the share permissions. I'm running Windows 7 RC (64-bit) using Visual Basic 2008 Express. Does anyone have any ideas on how to change the share permissions, not ntfs?

View 1 Replies


ADVERTISEMENT

Assessing NTFS User Folder Permissions?

Jul 9, 2009

Assessing NTFS user folder permissions

View 4 Replies

VS 2008 Creating A User And Share Permissions?

Mar 25, 2010

I'm creating an application that works with another I have no control over. My application needs to be able to create a user and change share permissions. Currently I am able to make a share, but I can't figure out how to set access permissions for that share.

The idea is that the newly created user (w/ password) will have permissions on the share I create.

View 1 Replies

Reading Remote Share Permissions Using WMI?

May 1, 2010

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;

[code]....

View 3 Replies

Retrieving Remote Share Permissions - .net 2010?

May 7, 2010

I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.should I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the permissions

Code:
strComputer = WScript.Arguments(0)
Set objWMI = GetObject("winmgmts:\" & strComputer & "
ootcimv2")

[code]....

View 1 Replies

Retrieving Remote Share Permissions - VB 2010?

Jul 6, 2009

I've search tons of .net pages and all I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.hould I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the

View 4 Replies

VS 2010 WMI Code To List Remote Share Permissions?

Apr 30, 2010

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.

[Code]...

View 1 Replies

VS 2010 : Share And Edit Variables Between Forms?

Jul 7, 2011

how to share and edit variables between forms? I want the user to be able to enter a value into a textbox and the program store it and then load another form and do calculations and display answers but I can't get it to work.

View 2 Replies

Ntfs To Ext3 Reader And Writer?

May 25, 2009

this project im working on is giving me a headache. am trying to write a program to recognie both ntfs and ext3 fileformats and enable the copying of files between them. ive done the ntfs bit and my problem is how do i implement the ext3 file system reader and writer using visual basic.net.any references would be really useful.

View 1 Replies

Reading NTFS Mounted Drive

Feb 17, 2012

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

[Code].....

View 4 Replies

Reading The NTFS And FAT32 FAT/MFT Tables?

Mar 16, 2011

I am trying to find some VB code examples on how to read the MFT/FAT Tables from NTFS and FAT32 drives. I am trying to scan the drive and to detect all deleted files and unallocated clusters on a particular drive.

View 4 Replies

Modifying String Containing Invalid NTFS Filename

May 6, 2009

I have a piece of code to debug. Because of unknown bugs it creates a dummy filename. I want to track all the pieces of code who fires that creates the dummy filename, so I can change the dummy file creation to a thrown exception. Since I the dummy filename is stored on a string, I plan to modify that string to contain an invalid NTFS filename, maybe containing invalid chars. Is there a reason to prefer some invalid chars over others? There are some predefined invalid NTFS filename destined to this purpose? (I may think of AUX , COM1 , LPT1 or PRN , but those names run the risk of start sending data to a port instead of throwing an exception).

View 1 Replies

Writing Of Files Leaves Corrupt NTFS?

Jul 3, 2007

Basically, we have an application which batch creates a large amount of files (pairs of PNG plus ASCII). The file count can exceed the one million.The first time the application ran the results were quite disappointing. The files get stored in folder structures of maximum 2000 files per folder. The tree depth gets only to two levels (root + packs folders). So the results would be stored in folders like "pack1","pack2"..."packn" each containing no more than 2000 files (1000 pairs in essence).

So getting back to the results, what happened was that although the application reported over 1.4 million files written, the results were that files were missing from the filesystem and others were corrupt (PNG cant be read and ASCII were blank filled with spaces).The speed that the files were written was not anything great (about 7 files per sec) and the total size ranged from 160K to 1.5M (rarely). The PNG images are 2000x2000 in size although I doubt it has anything to do with my problem.

Everything is done in pure .NET (image and ascii generation).The OS that has been tried was Win 2000 Advanced Server, Win 2003 Server plus XP Pro. The hardware ranged from Dual Core Workstation to high spec servers. The irony is that on the XP system the number of corrupt files was quite low where on the other two all hell broke loose. There were event logs written stating Event ID 2021 on the Win 2000 system and Paging faults on XP, which lead me to the next approach.

We wrapped the code to do an Application.DoEvents every second and refresh various statistic UI components. We obviously added Stream.Flush().Plus we added code to check the files (re-read them) once they are written. Even added "WriteThrough" option to avoid the OS cache! The result was stuggering as no errors were report yet the NTFS table again got corrupted!Now we inserted Thread.Sleep(100) after writing and then reading to confirm the file. Obviously this is slowing down the process but hope to have more stable results.

Reading and article about Event ID 2021 we saw it was suggesting to modify registry values, but the IT dep did not wish to accept this as they believe it is an application error.In pseudo code, here is more or less what is done:

<try>
<Create Image in memory>
<Open stream to filesystem>

[code]....

View 11 Replies

VS 2008 - Changing The File Permissions?

Mar 22, 2011

I've added an FTP client to a batch publishing program that I wrote about a year ago. The batch program "publishes" CAD files from "Pro/E" to "eDrawings". Upon publishing, some of "eDrawings" files are automatically uploaded to an external server via the newly written FTP client.The publisher and FTP client are working great.I'd like to add functionality that automatically changes the permissions on the files I'm uploading to our unix server (RHEL5). When I do this via SSH, I simply utilize a chmod command (i.e. chmod 0755 file.htm).I'm using VB.Net's DirectCast in my FTP Client.Is it possible to change the permissions on the files I'm uploading via FTP once they're on the server as part of the file uploading process?

View 1 Replies

VS 2008 Folder Permissions With Windows 7?

Jul 27, 2010

If I don't grant write permissions to the folder containing my exe file, I get an 'Access to the path binReleaseprogram.exe' is denied. But if I grant it write permission I don't get the error. Why would the executable need write permissions? I'm not writing anything to the root where it resides.

View 1 Replies

VS 2008 Windows Folder Permissions?

Jun 17, 2009

If I adjust permissions using the Security.Accesscontrol.DirectorySecurity on a directory, how can I make it so that subfolders automatically inherit the new permissions?

Brief overview of the situation is that my neighbors can't connect their Vista laptop to a shared folder on their computer running XP Home. They're getting access errors which I believe is because of the rights set on the folder. The problem is that XP Home won't let you adjust that and they're not upgrading.

I'm able to add the Everyone user to the directory I specify. But if I drag a new folder in or create a new folder, it does not have the Everyone user. Is there something I'm missing in this class that will let subfolders and files inherit the permissions?

View 1 Replies

List Deleted Files And Their Names From NTFS Drive

Mar 22, 2010

I'm trying to make a small app that reads MFT from a NTFS drive and lists deleted files and their names. The code is not ordered since its not finished yet. I made it basing on information a read at ntfs.com and some other examples found on the net. But the problem itself is the following. I have hard disk with to NTFS partitions, the main one having 250 GB and the second one having 1,5 GB. If I execute my code on the smaller drive, (using D as parameter for readfile api), I get the list of all deleted files exactly (I checked it with a recovery file app).

The problem is when I execute it on the other drive (C where Windows is installed, 7 if it matters), the problem is that I cant find any deleted file!!. The code gets all the files from MFT and then saves in a string variable only the deleted ones, I found that after deleting one file, it also disappears from the MFT (at least using my code). So, there may be some other way in which NTFS marks deleted files? As you see in my code, I iterate through the MFT entries and, from those that start with FILE, I take bytes 22 and 23 (0 base) and evaluate, if its value is 0 then its deleted, otherwise, it isn't (its a file or directory I think).

Public Structure SECURITY_ATTRIBUTES
Dim nLength As Integer
Dim lpSecurityDescriptor As Integer
Dim bInheritHandle As Boolean
End Structure
[Code] .....

View 3 Replies

C# - Reflection And Permissions Work Over Network - .net 2008

Nov 16, 2009

I have various projects that use reflection to access and invoke private or internal members in some of the framework classes. These projects all work fine on my machine (running visual basic express 2008), but are they guaranteed to work on another machine, or, say, over a network? I've had a look at Reflection-Permission, but I'm not sure if I need that granting to me or if I grant it to my project!

View 3 Replies

VS 2008 Anti-Virus Is Screwing Over How To Get Permissions

Aug 12, 2010

The server response was: 5.5.1 Unrecognized command. p14sm1462998ybb.9I'm using AVAST, but I need a solution that will work for all anti-virus programs.In Avast, there is a setting to deactivate the shields for 10 minutes. With the shields down, my email sends successfully, but this leaves my computer with no protection for that 10 minutes

View 4 Replies

VS 2008 Replacing Original File And Permissions?

Aug 25, 2010

I've got two programs, one is the main and the other is the updater. So far iv'e got it so that the main program checks for an update by comparing its version number with the latest one that's stored as a text file on the server. If there's a newer one, the update program is started and the main one closed. The update program will then use a web browser component to navigate to the download link and download the new version. The only problem I'm having at the moment is, How can I get the new downloaded version to replace the current one in Program Files? and will this cause permission problems?

View 10 Replies

[2008] Elevated (admin) Permissions In Vista

Mar 8, 2009

I've encountered several scenarios when my application wants to delete an item, but is prevented from doing so by the operating system. So I've been wondering, is it possible to ask for elevated status after the application has launched? E.g. the application needs to delete a certain file, so it asks for confirmation and then deletes the file...

View 1 Replies

Looking To Obtain Unique NTFS FileID's (Windows 2003) Via Program2003?

Feb 27, 2007

I need to gain access to Windows NTFS unique FileID...via VB.NET 2003...I found Kernel APIs ZwQueryDirectoryFile... calls which can return this info.

View 3 Replies

VS 2008 File Permissions (can't Delete, Can't Build, Can't Copy)?

Mar 12, 2010

I tried searching for this issue but the search gives me a database exception and I'm kind of at my wit's end. I'm sureEver since I upgraded to Windows 7 Professional I've had constant build problems with VS 2008. I can't use the Hosting Process (not that I normally do) because at build I'll be notified VS could not copy a support file (the hosting exe). In addition, every time I build I'm told my previous exe is in use by another process and cannot be accessed. My only recourse is to manually delete the file. That works a few dozen times but eventually Windows stops letting me delete it and tells me that I require permission from an Administrator to make changes to the file (I'm the administrator, stupid machine).

View 6 Replies

VS 2008 'randomise' The Share Values?

Jul 24, 2009

how can I 'randomise' the share values? (I am wanting to have some shares to have a higher risk than others, usually the ones with the higher value.)

View 3 Replies

VS 2008 Share Strings With Class?

Oct 22, 2009

Alright i have 3 strings in a class1.vb. In form1 it will put in a text. In form2 it will read the 3 strings and print them on 3 textbox

View 1 Replies

Visual Basic 2008 Share A Folder

Jan 12, 2011

I have the code to create a folder, does anyone have the code to share the folder and set the permission for everyone to have full control?

View 4 Replies

Visual Basic 2008 Share A Folder?

Jan 12, 2011

I have the code to create a folder, does anyone have the code to share the folder and set the permission for everyone to have full control?

View 4 Replies

VS 2008 - TCP File Share (Sending String)

Feb 7, 2012

I didn't saw much samples about tcp file share. They look similar to what I am using to send string. My question is : Does these codes work with any kind of files? And May I have some hints about how to do it?

View 1 Replies

VS 2008 Copy File To Network Share With Username/pass Passed In The Code

Aug 4, 2010

I've been looking at accessing shared folders, read and write, via the network without being prompted by the OS for the username and password.

On this forum, and googling, I can find many things about accessing network shares, but none using code which also passes the username and password required.

What I'm basically looking for is to not have to map a drive on the users computer. Then using code, write or read files from a network share and at the same time pass the username / password required for that network share.

View 11 Replies

Data - Add An Edit Button That Will Edit Existing Entries?

Apr 28, 2010

I have a form that adds new contacts. New contacts are added by pressing an appropriate button and they appear as an entry in the list on the form. I try now to add an edit button that will edit existing entries.User will select a given entry on the list and press edit button and will be presented with an appropriate form (AddContFrm).Right now it simply adds another entry with the same title. Logic is handled in a class called Contact.vb Here is my code.

Public Class Contact
Public Contact As String
Public Title As String[code]....

View 1 Replies







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