fsX Posted August 26, 2004 Posted August 26, 2004 Hello all, Anyone know how to open the security window on a file? That's when you right click on a file and select Properties/Security... I'm trying to do this using C# and I can't find any references.... :confused: :confused: :confused: Thx, fsX Quote
Administrators PlausiblyDamp Posted August 26, 2004 Administrators Posted August 26, 2004 http://www.xtremedotnettalk.com/showthread.php?t=87965 was posted less than 2 hours before yours about exactly the same topic, may be worth keeping your eye on that one to see if anything comes up. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
fsX Posted August 26, 2004 Author Posted August 26, 2004 Thanks for your relpy, but I'm looking for the security properties window... That thread might not get there... fsX Quote
TripleB Posted August 27, 2004 Posted August 27, 2004 Hey, You might look @ the solution i posted on my thread about the properties dialog box maybe you can start from there ...... this one: Greetz Quote
fsX Posted August 27, 2004 Author Posted August 27, 2004 Thanks TripleB, I will give that a try! :D Quote
fsX Posted August 27, 2004 Author Posted August 27, 2004 I gave it a try and this API won't do the trick... You can only preform these functions on a folder/file: edit - Launches an editor and opens the document for editing. find - Initiates a search starting from the specified directory. open - Launches an application. If this file is not an executable file, its associated application is launched. print - Prints the document file. properties - Displays the object's properties. fsX Quote
TripleB Posted August 27, 2004 Posted August 27, 2004 Hey fsx, tell me if I am mistaking but doesn't the security tab only show when you are logged on as Administrator or in save mode?? Greetz Quote
fsX Posted August 27, 2004 Author Posted August 27, 2004 Hi TripleB, Thats not true... On Windows servers by default you will always see the security tab, on Windows XP you need to remove 'Use simple file sharing' from Windows Explorer to see it....... fsX Quote
TripleB Posted August 27, 2004 Posted August 27, 2004 ok good to know but still, If I use my code in save mode(because i didn't knew your answer) it I get the file properties AND the security tab so ..... Quote
fsX Posted August 27, 2004 Author Posted August 27, 2004 It works fine for me too... but I want the program to run a little smoother and show the security tab right from the start; instead of clicking the security tab... Don't want to confuse the end user.... fsX Quote
Joe Mamma Posted August 28, 2004 Posted August 28, 2004 look for some p/invoke code for GetFileVersionInfo and GetFileVersionInfoSize and build your own display Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
fsX Posted August 30, 2004 Author Posted August 30, 2004 Hi Joe Mamma, look for some p/invoke code for GetFileVersionInfo and GetFileVersionInfoSize and build your own display How could you use this to see the NTFS security? fsX Quote
Joe Mamma Posted September 2, 2004 Posted September 2, 2004 Hi Joe Mamma, How could you use this to see the NTFS security? fsXI didnt read your post closely enough. . . give me a few theres a different api call for this. . . one moment Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Joe Mamma Posted September 2, 2004 Posted September 2, 2004 You want GetNamedSecurityInfo P/Invoke - http://www.pinvoke.net/default.aspx/advapi32.GetNamedSecurityInfo haven't tried it but it looks right Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.