473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CACLS command in C#

Hello professionals...
can any one guide me to write a program which mimic CACLS command , or how to call any windows tool such as shutdown command using C# program. any info will be appreciated.
Sep 16 '11 #1
1 4197
Use DirectorySecurity, FileSecurity class to set permission.

To shutdown system from c#

Expand|Select|Wrap|Line Numbers
  1. ProcessStartInfo pinfo = new ProcessStartInfo("shutdown", "-s");
  2. Process proc = new Process();
  3. proc.StartInfo = pinfo;
  4. proc.Start();
  5.  
Sep 18 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: TEK | last post by:
Hello I'm wondering if anyone out there might give some input/suggestions/viewpoints around the Command pattern. In my case, the number one priority for using the pattern is undo support. Some...
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
1
by: Matt | last post by:
I used to execute a command line script in IIS 4 using Dynuexec. This is a third part server object I installed on the server (http://www.dynu.com/dynuexec.asp). I installed this object onto my...
0
by: Jeff Knudson | last post by:
I am looking for the C# equivalent of invoking the CACLS command in VBScript to set the permissions on a new user account HomeDirectory. I think I'm close, but my permissions are listed under...
1
by: Support | last post by:
in VB.NET, I am trying to assign Group rights to a network file. I am successfull at impersonating a domain account with rights but the following code is failing, ie, nothing happens at the file...
3
by: David Eadie | last post by:
G'Day all, I cant for the God in me work out how to execute the following command line in vb.net: (watch for the word wrapping also) Sub(ByVal username As String) Shell("ECHO Y| cacls...
2
by: Francisco Birrer | last post by:
Hello group I have the following instruction Process.Start("cacls.exe ", Parametros) where parametros it is east value c:\inetpub\wwwroot\ExxWeb /g IUSR_FBIRRER:R /e /p IUSR_FBIRRER:R The...
5
by: dananrg | last post by:
Is there a standard library module in Python 2.4 (Win32) that will return directory permissions / ACLs (e.g. users, groups, and what rights they have)? Otherwise, I'm faced with sending "cacls...
6
by: venky5186 | last post by:
How do I run commands like cacls or any other windows commands using vb.net I am unable to run commands using the shell method in Vb.net but I would like to be able to run other executables with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.