|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Changing folder securityHi all!
I need to set folder security to full control to everyone is it possible from code (without calling any external applications and sripts) ? example would be nice. Thanx This functionality is not available in the v. 1.x .NET Framework. You could
either call the relevant Windows API functions yourself via p/invoke or use a wrapper API like the one available at http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9. HTH, Nicole Show quoteHide quote "Feldman Alex" <utxe***@mail.ru> wrote in message news:eRku4JTNFHA.2136@TK2MSFTNGP14.phx.gbl... > Hi all! > I need to set folder security to full control to everyone > is it possible from code (without calling any external applications and > sripts) ? > example would be nice. > > Thanx > > Thanks Nicole
Maybe you know which Windows API should i use Thanks again "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9.news:OJaxzwTNFHA.1172@TK2MSFTNGP12.phx.gbl... > This functionality is not available in the v. 1.x .NET Framework. You could > either call the relevant Windows API functions yourself via p/invoke or use > a wrapper API like the one available at > Show quoteHide quote > > HTH, > Nicole > > > > "Feldman Alex" <utxe***@mail.ru> wrote in message > news:eRku4JTNFHA.2136@TK2MSFTNGP14.phx.gbl... > > Hi all! > > I need to set folder security to full control to everyone > > is it possible from code (without calling any external applications and > > sripts) ? > > example would be nice. > > > > Thanx > > > > > > There are many Windows API functions that you will need to call in order to
set the ACL on a file. Even if you don't want to use the library available at http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9, you could download it and examine its API usage in order to figure out how this is done. Show quoteHide quote "Feldman Alex" <utxe***@mail.ru> wrote in message news:%23yGkJRUNFHA.1308@TK2MSFTNGP15.phx.gbl... > Thanks Nicole > > Maybe you know which Windows API should i use > > Thanks again > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message > news:OJaxzwTNFHA.1172@TK2MSFTNGP12.phx.gbl... >> This functionality is not available in the v. 1.x .NET Framework. You > could >> either call the relevant Windows API functions yourself via p/invoke or > use >> a wrapper API like the one available at >> > http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9. >> >> HTH, >> Nicole >> >> >> >> "Feldman Alex" <utxe***@mail.ru> wrote in message >> news:eRku4JTNFHA.2136@TK2MSFTNGP14.phx.gbl... >> > Hi all! >> > I need to set folder security to full control to everyone >> > is it possible from code (without calling any external applications and >> > sripts) ? >> > example would be nice. >> > >> > Thanx >> > >> > >> >> > > Thanx a lot Nicole
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9,news:uMtp4jUNFHA.1176@TK2MSFTNGP10.phx.gbl... > There are many Windows API functions that you will need to call in order to > set the ACL on a file. Even if you don't want to use the library available > at > Show quoteHide quote > you could download it and examine its API usage in order to figure out how http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9.> this is done. > > > > "Feldman Alex" <utxe***@mail.ru> wrote in message > news:%23yGkJRUNFHA.1308@TK2MSFTNGP15.phx.gbl... > > Thanks Nicole > > > > Maybe you know which Windows API should i use > > > > Thanks again > > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message > > news:OJaxzwTNFHA.1172@TK2MSFTNGP12.phx.gbl... > >> This functionality is not available in the v. 1.x .NET Framework. You > > could > >> either call the relevant Windows API functions yourself via p/invoke or > > use > >> a wrapper API like the one available at > >> > > Show quoteHide quote > >> > >> HTH, > >> Nicole > >> > >> > >> > >> "Feldman Alex" <utxe***@mail.ru> wrote in message > >> news:eRku4JTNFHA.2136@TK2MSFTNGP14.phx.gbl... > >> > Hi all! > >> > I need to set folder security to full control to everyone > >> > is it possible from code (without calling any external applications and > >> > sripts) ? > >> > example would be nice. > >> > > >> > Thanx > >> > > >> > > >> > >> > > > > > > March 31, 2005
It is not provided in .Net 1.* directly, but it is very easy to do with a different class. You just have to use the command line from code. (By the way, it is supported in 2.0) Imports System.Diagnostics dim Pro as new Process Pro.StartInfo.Filename = "xcacls" Pro.StartInfo.Arguments = "FOLDERPATH /G Everyone:F /Y 'Set so that no window appears while running Pro.StartInfo.UseExecuteShell = false Pro.StartInfo.CreateNoWindow = true 'Redirect output to the process class for futher examination Pro.StartInfo.RedirectStandardOutput = true Pro.Start dim reader as streamreader = Pro.StandartOutput dim output as string = reader.readtoend Pro.WaitForExit() reader.close messagebox.show(output) This will show the output generated from xcacls in a messagebox. I hope this helps and have a great day! (This is how you can use command line programs from code.) Joseph MCAD Show quoteHide quote "Feldman Alex" wrote: > Thanx a lot Nicole > > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message > news:uMtp4jUNFHA.1176@TK2MSFTNGP10.phx.gbl... > > There are many Windows API functions that you will need to call in order > to > > set the ACL on a file. Even if you don't want to use the library > available > > at > > > http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9, > > you could download it and examine its API usage in order to figure out how > > this is done. > > > > > > > > "Feldman Alex" <utxe***@mail.ru> wrote in message > > news:%23yGkJRUNFHA.1308@TK2MSFTNGP15.phx.gbl... > > > Thanks Nicole > > > > > > Maybe you know which Windows API should i use > > > > > > Thanks again > > > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in > message > > > news:OJaxzwTNFHA.1172@TK2MSFTNGP12.phx.gbl... > > >> This functionality is not available in the v. 1.x .NET Framework. You > > > could > > >> either call the relevant Windows API functions yourself via p/invoke or > > > use > > >> a wrapper API like the one available at > > >> > > > > http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9. > > >> > > >> HTH, > > >> Nicole > > >> > > >> > > >> > > >> "Feldman Alex" <utxe***@mail.ru> wrote in message > > >> news:eRku4JTNFHA.2136@TK2MSFTNGP14.phx.gbl... > > >> > Hi all! > > >> > I need to set folder security to full control to everyone > > >> > is it possible from code (without calling any external applications > and > > >> > sripts) ? > > >> > example would be nice. > > >> > > > >> > Thanx > > >> > > > >> > > > >> > > >> > > > > > > > > > > > > >
ClientCertificates and IIS5 with https://localhost
Windows Authentication question Finding out if user has privileges to a diectory. X.509 certificates and httpwebrequest Problem with RSACryptoServiceProvider ( incorrect usage of public-private keys ? ) RE: Designtime licenses, I just don't get it Custom principles and DnsPermission.Demand() Sharing Application and Session scope with ASP in IIS6 HELP Security in .Net framework Using Weak keys in DES and TripleDES |
|||||||||||||||||||||||