Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing the sharing of a drive
Message
From
29/12/1999 06:50:49
 
 
To
29/12/1999 06:36:50
Shaheer Shamsi
Boston Education & Software Technologies
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00309735
Message ID:
00309757
Views:
23
>Dear friend
>
>I want to remove the sharing of a particular local drive present on the host computer itself through a VFP program so that no one is able to log into the application unless the sharing is once again restored after the indexing of the data file. I will compile .exe of my appln. in such a way that on the main host computer a seperate .exe will be running which will take care of removing the sharing and indexing of data files and on target system another .exe which will be my main application.
>
>If U have any suggestions pls do respond ASAP.
>

You may want to investigate the use of the ADSI components from Micrsoft to handle this; they can be downloaded from Microsoft. There's an example of how to use them for this on the MS Web site - try:

ADSFSHAR.EXE: SAMPLE: ADSfshare.exe Demonstrates Manipulating ADS File Shares
http://support.microsoft.com/support/downloads/DP3295.ASP

Please note that removing a share is from my POV entirely the wrong way to do this, but it's your decision to do so. Simply opening the file exclusively will prevent others from acquiring a lock without the risk of breaking things because of changes in what is or is not shared, and avoids the situation of breaking the network environemnt entirely if you alter the share and your program dies. It also prevents two or more stations from being able to work on different files at the same time. I don't think this is a valid or reasonable approach to the matter, but it's your application
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform