473,472 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Changing permissions on NTFS file

Hi,

I am looking at a way in C# to change the permissions of a file to
localmachine\Users (Modify).

Thanks
Eric
Nov 17 '05 #1
2 1513
You can use Shell Execute or PInvoke to tell cacls.exe what to do.

Alternatively you could try usin WMI.

HTH
Stuart

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:65**********************************@microsof t.com...
Hi,

I am looking at a way in C# to change the permissions of a file to
localmachine\Users (Modify).

Thanks
Eric

Nov 17 '05 #2
Thanks for the info.

Can you elaborate about the WMI solution? Do you have an example?

I have looked at MSDN and the samples are too simple.

Thanks
Eric

"msnews.microsoft.com" wrote:
You can use Shell Execute or PInvoke to tell cacls.exe what to do.

Alternatively you could try usin WMI.

HTH
Stuart

"Eric St-Onge" <er**********@community.nospam> wrote in message
news:65**********************************@microsof t.com...
Hi,

I am looking at a way in C# to change the permissions of a file to
localmachine\Users (Modify).

Thanks
Eric


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BingoHandJob | last post by:
Hello group! I'm having a problem and I hope some of you may be able to point me in the right direction. I inherited a web site using php, running on Windows 2000 & IIS. The site was...
9
by: Hugh Welford | last post by:
Hi, I have installed IIS5 on my machine so that I can do offline asp web development. (using WIN XP PRO). My machine is called "development" I have published an on-line working web to...
7
by: Kim Lots | last post by:
Hi Sorry to disturb you again but i really like to know what's the NTFS folder permissions on a "virtual directory" folder for a public webserver iis 5.x running ASP 3.0 with an Access DB on a...
5
by: travelling_nerd | last post by:
Hi, I'm trying to write a script that will allow validated users to download a file that has specific ntfs permissions. Here's a summary: Scenario: 1) The name of the file is "binary.zip"....
6
by: !!! Klutzo !!! | last post by:
I give permissions for ASPNET on a top level subdirectory. A windows program copies a file into the subdirectory, however, my web service cannot access the file because it does not have...
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
7
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted...
0
by: Isabelle | last post by:
Hi I have posted this in the microsoft.public.frontpage newsgroups. Since it involves both Frontpage ext. 2002 on a windows 2000 Advanced's web server, and ASP.Net (framework 1.0), I decided to...
2
by: Phil Hey | last post by:
I am trying to set permissions on a folder programmatically, and have success fully used the code below for knowledge base article 266461 : How To: Programmatically Set NTFS File System Folder...
3
by: palepimp | last post by:
Hello all, I have searched far and wide for a solution to my issue. In short, here is the problem: 1. 3 PC's enter data into an Access 2003 database (PC's are running Vista w/ Office 2007...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.