Google Answers Logo
View Question
 
Q: Programmatically Opening the Windows Folder Properties Dialog to the Sharing Tab ( No Answer,   1 Comment )
Question  
Subject: Programmatically Opening the Windows Folder Properties Dialog to the Sharing Tab
Category: Computers > Programming
Asked by: iammrjvo-ga
List Price: $10.00
Posted: 23 Sep 2004 06:40 PDT
Expires: 23 Oct 2004 06:40 PDT
Question ID: 405228
I'm working on an application in Visual Studio 6 which will require
the user to share Windows folders under some circumstances.  In order
to allow the user to set up sharing for a folder, I want to
programmatically open the window folder properties dialog to the
sharing tab.  I can open the properties dialog using this code
snippet:

   SHELLEXECUTEINFO sei;
   ZeroMemory(&sei,sizeof(sei));

   sei.cbSize = sizeof(sei);
   sei.lpFile = "C:\\FNR\\user\\data";
   sei.lpVerb = "properties";
   sei.fMask  = SEE_MASK_INVOKEIDLIST;

   ShellExecuteEx(&sei);

This opens the properties dialog to the "General" tab.  I want to open
to the "Sharing" tab.  How can I do that?

I expect an answer that can be applied to any modern MSFT Windows
system without having to install any third-party development tools or
to jump through any unreasonable hoops.  Thanks.

Clarification of Question by iammrjvo-ga on 23 Sep 2004 06:43 PDT
In case it isn't obvious, I'm working in Visual C++.  Thanks again.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Programmatically Opening the Windows Folder Properties Dialog to the Sharing Tab
From: igorfrey-ga on 19 Oct 2004 16:54 PDT
 
You can use this code to open the "Sharing" tab.

	SHELLEXECUTEINFO sei;
	ZeroMemory(&sei,sizeof(sei));

	sei.cbSize = sizeof(sei);
	sei.lpFile = "C:\\TEMP";
	sei.lpVerb = "properties";
	sei.fMask  = SEE_MASK_INVOKEIDLIST;

	ShellExecuteEx(&sei);
	Sleep(250);

	keybd_event(VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY, 0);
	keybd_event(VK_TAB, 0, KEYEVENTF_EXTENDEDKEY, 0);
	keybd_event(VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy