How to control network shares programatically?

Hello,

I am trying to discover a non-GUI method of recording a network
share's permissions and security settings, taking the share 
off-line, doing a bit of maintenance on the data on the share,
bringing the share on-line again, and restoring all of the 
security and permission settings.  Only the top level (shared
folder) permissions and security settings need to be preserved.
The individual files don't have special settings.

The general NET SHARE commands can remove and install a shared
folder, but can't help record and manage the security and 
permissions settings.  I'm trying to figure out what APIs
are needed.  I presume that there may be other tools that
developers have created as well.

I found the Windows 2003 Resource Kit and two of the utilities
in there are supposed to work on XP and 2003.  I've not verified
that they do what I need yet.

The process would hopefully be compatible with Windows 2000,
XP, and 2003.

So far I've been unsuccessful at locating a source for this
information.  I'd very much appreciate any leads you might
have.

Thank you,

David
0
11/4/2005 6:04:50 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
538 Views

Similar Articles

[PageSpeed] 31

Take a look the NetShare... functions of the SDK

AliR.

"David" <FlyLikeAnEagle@United.Com> wrote in message
news:rOdGr40LMPU3-pn2-8e4l6EvnzT8d@localhost...
> Hello,
>
> I am trying to discover a non-GUI method of recording a network
> share's permissions and security settings, taking the share
> off-line, doing a bit of maintenance on the data on the share,
> bringing the share on-line again, and restoring all of the
> security and permission settings.  Only the top level (shared
> folder) permissions and security settings need to be preserved.
> The individual files don't have special settings.
>
> The general NET SHARE commands can remove and install a shared
> folder, but can't help record and manage the security and
> permissions settings.  I'm trying to figure out what APIs
> are needed.  I presume that there may be other tools that
> developers have created as well.
>
> I found the Windows 2003 Resource Kit and two of the utilities
> in there are supposed to work on XP and 2003.  I've not verified
> that they do what I need yet.
>
> The process would hopefully be compatible with Windows 2000,
> XP, and 2003.
>
> So far I've been unsuccessful at locating a source for this
> information.  I'd very much appreciate any leads you might
> have.
>
> Thank you,
>
> David


0
AliR3470 (3236)
11/4/2005 7:54:30 PM
Hello,

On Fri, 4 Nov 2005 19:54:30 UTC, "AliR" <AliR@online.nospam> wrote:

> Take a look the NetShare... functions of the SDK
> 
> AliR.

Thank you!  I've searched on all kids of terms including net and
share but it seems like I kept missing those.  Hopefully I can
put together what I need.  It looks promising.

David
0
11/5/2005 2:37:56 AM
Reply:

Similar Artilces:

A save operation on table "PM_Transaction_Work" casused a sharing
Hi, When my user post a PM batch using VPN, the connection is broken and the batch posting is interrupted. The status is "Table Updates Interrupted". When I try to recover the batch through Batch Rocovery, it did not allow to. saying that" Batch NOV INVOICES" failed to complete posting. Use Batch Recovery window to complete the posting process. " (I am at the batch recovery window already!!!!) When I click "more" then I see the following: "A save operation on table 'PM_Transaction_WORK' caused a sharing error." Further invest...

Instant Send\Recieve over the network
I am looking for a way to set the instant send and recieve over the network. So that anyone in house that sends an e-mail will get it automatically. The e-mail coming from out of the office will still come in at the regular 5 minute or so interval. I knwo this is possible I jsut don't know how. willie <williamr@assoc-eng.com> wrote: > I am looking for a way to set the instant send and recieve over the > network. So that anyone in house that sends an e-mail will get it > automatically. The e-mail coming from out of the office will still > come in at the regular 5 mi...

Network Path/Excel Open Dialog Problem
Greetings. I am using Excel's open dialog to locate a file that needs to be imported. The only way I have found to set the default directory for this dialog (so it is in the directory I want when the dialog opens) is to change the current directory to the desired directory, open the dialog and locate the file and then put the current directory back to the orignal directory when the dialog closes. Too much directory hopping, if you ask me... Is there an easier way to do this? Hi but this is the way how you have to do it :-) -- Regards Frank Kabel Frankfurt, Germany "Nny...

WebBrowser Control Displayed Font Size.
In Windows Explorer 7 a menu option is available to change the displayed font size. "View" > "Text Size". Several options are available; "Largest", "Larger", "Medium" etc. Is the functionality available to programmatically adjust the displayed font size in the WebBrowser control? The container for the control is in a Windows form. ...

How to enable Shared Contacts to show up When Addressing an email message.
How to enable Shared Contacts to show up When Addressing an email message. Basically when you type in a email address/name it finds it in a another users "SHARED" contacts... (So you don't have to manually find/add it.) Can someone point me to some instructions? Thanks Russ -- Russell Grover - SBITS.Biz [SBS-MVP] MCP, MCPS, MCNPS, SBSC Remote Small Business Server/Computer Support - www.SBITS.Biz BPOS - Microsoft Online Services - www.Microsoft-Online-Services.com This is a multi-part message in MIME format. ------=_NextPart_000_0736_01CAFD9B.F594AC40 C...

Why Do Shortcuts Change to Network Addresses?
This has been happening as long as I've used XP pro. Suddenly, for reasons I've never figured out, some of my desktop shortcuts to folders suddenly change from local addresses to network addresses. For example: C:\Documents and Settings will change to \\JimsComputer\c\Documents and Settings. Does anyone know why this happens and how I can stop it. jim jim evans wrote: > This has been happening as long as I've used XP pro. Suddenly, for > reasons I've never figured out, some of my desktop shortcuts to > folders suddenly change from local addre...

MSChart control
suppose i created an application with a mschart control, done all the job of drawing and all that, is it possiable in any way to translate the info of the mschart cotnrol to a spreadshit info that excel could import? I succeed in converting the onto from my listctrl to a file excel could read but what can i do with the chart? I thought about not using the mschart control and create my own charting code using the knowen methods in mfc for drawing lines and etc. but again how can i convert to information to an excel shape? ...

Sharing excel info
Is there a way to create an MS Calendar using information from an Excel spreadsheet?? I have tried using the calendar function in both Word & Works to no avail. Any help you can provide is greatly appreciated. ...

Sharing Calendar with personal dist list
I have been asked to find a way for people to share their calendars with personal distributions lists. Is this possible? Thanks! Wes If you in an Exchange environment and are talking about Exchange distribution lists; yes, you can. Just like you normally set permissions. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Properly back-up and restore your Outlook data -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "stahlerw" <stahlerw@discussions.microsoft.com> wrote in message news:258B3114-9ADE-4B8E-8184-7BE8FC09EDA8@microso...

Microsoft Form 2.0 Controls in VC causing error
My application developed using VC++6.0 in W2K running well in my development PC (with Visual Studio 6.0 installed). When I run the same application in a client PC without VS installed, I get this error: An unsupported operation was attempted. At last I found out it is caused by the 'Microsoft Form 2.0 commandbutton' and 'Microsoft Form 2.0 Label'. After I removed these controls the application run fine. I have registered the file FM20.dll using Regsvr32 and it show succeeded. May someone help how can I make those controls run well in my client PC? Thanks. ...

Please Help!Tree control:GetSelectedItem()
I am using VC++.NET IN WIN 2000 In the project I am using tree contro When I make right click on the item in the GetSelectedItem() func it doesn't read the correct data from the selected item it reads the data from the previous selected item This problem doesn't matched if I make first left click on the item and after that right click,in this scenario it reads the correct item. Why the GetSelectedItem() doesn't return the correct item data void test::OnNMRclickTree1(NMHDR *pNMHDR, LRESULT *pResult HTREEITEM hmyItem,hti; OnTvnSelchangedTree1(pNMHDR, pResult) ... void test::On...

Very weird tab control behaviour !?!
I have a form with a tab control. All looks great in design view but in form view the tab and caption part of the control moves up and overlays the controls above. I tried increasing the height of the form and moving the tab control way down but in form view the tabs and captions still float way up and overlay the control above. I've been stuck on this for hours and am completely stuck. No idea how to fix this. I tried removing the tab control completely then pasting it back - same result. Another strange clue, when I increase the TOP property on the tab control, it never changes in...

Resizing controls
I am working with Access 2007. When I try to resize one of the controls, all of the controls resize to the size of the one that I am working with. How can I separate the controls so that I can resize them individually? I never encountered this problem with Access 2003. There is a setting that you need to change, to change it from "tabbed form" to "overlapping." See my "quick tutorial" on my website here: http://www.btabdevelopment.com/main/QuickTutorials/A2K7Howtochangefromtabbedforms/tabid/81/Default.aspx -- Bob Larson Access World Forums Super Moderat...

AxtiveX ctrl subclassing custom control
Hi! There are plenty of examples where ActiveX ctrls are subclassed from Windows controls such as BUTTON, EDIT, etc. I've got custom control based on CRichEditCtrl, and I'd like to build ActiveX ctrl subclassed from it. I'm not quite sure how this should be done. In all examples I found the approach is like this - BOOL CActiveXWrapperCtrl::PreCreateWindow(CREATESTRUCT& cs) { cs.lpszClass = _T("EDIT"); return COleControl::PreCreateWindow(cs); } well, my custom control does not have registered name, so what should i do? many thanks kdv09 ...

Unable to Overwrite Existing Network File
I have been searching in vain for a solution to this problem for quite some time. What happens is that even when running a simple MFC program (i.e. created from the Wizard & run), I cannot overwrite an existing network file. I can create new files on the network without a problem. Also, no other programs installed on my machine have this problem (notpad, Word, etc.). I have checked my network permissions and I have every permission available on the target directory with the exception of "Full Control", "Change Permissions", and "Take Ownership". Does anyo...

how about implement network bandwidth shaping for win7?
I wanna implement a traffic shaper for win7 to limit some application's downloading speed.If I write a ndis intermediate driver and throttle the receiving speed from the IM driver, the IM driver should put the application's rx frames into a queue to limit its receiving speed, that will use out the miniport NIC driver's rx buffer so that the NIC will send pause frame to the partner. Then all other application's receiving performance will decline too. This is not what I expect. It seems that Winsock Kernel and Windows Filtering Platform can't be used to shape traffic, ...

Referancing a subforms control
i have a value i would like to assign to a subforms control but i am having no luck in doing so. the main form is called "Site_info_frm" the subform is called "FAsub_info_frm" and the control is called "File_path" could someone show me how to put them together to insert the value. Thanks Forms!Site_info_frm!FAsub_info_frm.Form!File_path Note, though, that depending on how you added FAsub_info_frm as a subform on Site_info_frm, it's possible that the subform control on Site_info_frm might be named something other than FAsub_info_frm. If the subform cont...

Hyperlink control
Is it possible to have a control hyperlink to open a specific worksheet in an excell file. I tried adding #'wksName' to the hyperlink properties but that gave me an invalid reference error opening excel. ...

How To Execute The Start -> Run Programatically
Hey Friends Can someone suggest how we can Execute The Start -> Run Programatically? Take a look at ShellExecute/CreateProcess. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "vikrant" <vikrant_kpr@hotmail.com> wrote in message news:eO70xHhjDHA.684@TK2MSFTNGP09.phx.gbl... | Hey Friends | | Can someone suggest how we can Execute The Start -> Run Programatically? | | | | Hey...here is another link to TaskInfo 2000. It is a later version but just as good. I don't think you have to register it (can't remember). http://www.devhood.com/tools/tool_details.a...

Protect and Share Questions
I would like to share a file which I only want everyone to be able to view the file and not make changes. But currently I have the file on the share drive but everyone has full control also when someone has the file open I am not able to save changes. Can someone out there give my some tips to help me out? Any info is good info. Thanks Jeff, Do you have your workbook protected? if you use a password to protect it, be sure to record it someplace safe so you can get to it later for making changes - you never know when a little amnesia will hit!! ;) jeff >-----Original Message----- ...

controlling fields on a form
I am using Word 2003 to make a form and put in some fields. There are a couple of things I am unable to do, however. When data is input into the field by the user, text below the field is pushed down. How do I control the field so it does not affect surrounding text? I would like to set the field at a maximum length (I can do this) and not have the other text on the form get moved. Finally, the fields I insert are of a fixed length, about 1 inch. I double click on the field and can set the maximum length, but the default size of the field remains at about 1 inch. Can I g...

XmlValidation Errors int TreeView Control
I show some Xml file in Windows TreeView control. Wenn I validate Xml with some Xml-Schema, I have to show errors node with red color. How can I find an element name, which causes an Exception of XmlValidatingReader? In XmlValidatingReader, you can not determine the element/attribute name which caused the error but you can find out the line number and position where the error occured. This information is available on the XmlSchemaException, if you have hooked up a validation event handler. Zafar "nataly" <nataly@discussions.microsoft.com> wrote in message news:7E9753AE-4...

Shift+Insert does not paste into edit control on CFormView derived view
Hi, I have an edit control on a form view. The problem is that pasting of clipboard content does not seem to work with Shift+Insert key combo. There is no problem with pasting when using context menu. If I test the underlying dialog from IDE resource editor then Shift+Insert works fine. The Shift+Insert combo also works fine with other dialogs in the app. This problem can be easily illustrated by creating a simple SDI app with a form view and then dropping an edit control onto the form. Is this an expected behaviour? Thanks, Bogdan "Bogdan" <bogdan@domain.com> wr...

microsoft date and time picker control #3
Is there a way to hide the DTPicker "Button" when printing an Excel page? You should be able to set the PrintObject Property option to False in the Properties Window for the object. PC "Don" <Don@discussions.microsoft.com> wrote in message news:576CACE2-BB4A-450A-A894-464E4095DCA3@microsoft.com... > Is there a way to hide the DTPicker "Button" when printing an Excel page? Thank you for the suggestion, but I want the date to be visible when printing, not the button. This works in InfoPath and other non Microsoft applications, please advise if yo...

Function to control how data displayed
I have 2 columns that I exported from Access to Excel. In Access th columns were Yes or No. In excel they display as True or False. I wan them to show as Yes or No what is the function to make this happen? Thank you! -- LOgle531 ----------------------------------------------------------------------- LOgle5318's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2659 View this thread: http://www.excelforum.com/showthread.php?threadid=39860 LOgle5318, Assuming your True and False are in columns A & B then In C1 put =IF(A1="True","Yes") and...