>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