GoldenWonder Posted May 6, 2010 Posted May 6, 2010 I've got an old application (VB6) that creates user shares and sets NTFS permissions that has worked since Windows 2000. Now Server 2008/64bit has come along, and it won't work at all so it looks like a re-write. I'm using Visual Basic Express 2008 and so far can't see to find a simple way to do the following: - Create a folder on a local drive - Share the above folder (and set the share permissions) - Set the permissions for a folder within that share and set them to replicate downwards Has anyone got a code snippet or example they can show me? I'm going around circles here trying to find a way around this!
SYNACK Posted May 6, 2010 Posted May 6, 2010 Localzuk made something similar without the sharing bit from the code of SetACL (opensource) and was good enough to post if for everyone here: http://www.edugeek.net/forums/windows-server-2000-2003/50600-setting-folder-owners-programatically.html#post463920
GoldenWonder Posted May 7, 2010 Author Posted May 7, 2010 Cheers for that - its a shame I can't register the ADsSecurity.dll on the Server 2008 box as that would save me a lot of time. This lets me set NTFS permissions quite easily Not sure why I can't register it - it works ok on Server 2003 and various other Windows variants.
cromertech Posted May 7, 2010 Posted May 7, 2010 its a shame I can't register the ADsSecurity.dll on the Server 2008 box as that would save me a lot of time. Very odd. I have this dll registered on my windows 7 machine thought it would work the same. I just put it into the syswow64 folder and did the usual regsvr32 command and it put it in for me. Only use it to create new year 7 accounts through a spreadsheet but makes it a doddle
GoldenWonder Posted May 10, 2010 Author Posted May 10, 2010 Sorry I wrote that wrong! I could register it,but it bombs out the program as soon as you try to create an object. I've had to go backwards and simply use Shell commands to use cacls , which works. Seems a shame to go back to DOS commands but ADsSecurity is from 2001 and theres no update!
ANB Posted June 18, 2010 Posted June 18, 2010 It's probably too late but I have some free utilities which handle creating shares, setting permissions, and propagating them accordingly. I used to have them on my website at ANB Software Homepage but removed them when I merged them all together to make paid for applications. If you still need these then email me at [email protected] and I will email them over to you. Adam
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now