Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Hide Subdirs or Drives
Message
De
03/11/1998 05:31:59
 
 
À
02/11/1998 23:25:04
Information générale
Forum:
Windows
Catégorie:
Administration & Sécurité
Divers
Thread ID:
00153805
Message ID:
00153839
Vues:
21
>Can the following be done under WinNT Server and Workstation SP3? I would like to make a certain subdirectory or subdirectories invisible to the users except through a VFP application. If the user looks for the subdirectory via NT Explorer or a DOS window or anything else other than the VFP app, the subdir will not appear. However, the VFP app has to be able to see the subdir.
> This subdir would hold the application's data. The goal is to prevent access to the data except through the app.

You could set the Hidden attribute of the directory; if set, it would not be visible in Explorer (or in a DOS DIR) if the View option to show all files including hidden and system files is not checked. This setting is available in Windows Explorer (unless blocked by a System Policy; you could make a custom policy and enforce it for anyone but a user with Admninistrative privileges.) Hidden directories can be accessed explicitly by reference, and could be seen in a DOS DIR listing with an optional command line switch. I am not certain if the Hidden attribute is respected across a network access; certainly, the View option of the network user will determine Explorer's behavior, not the Explorer setting of the machine with the hidden directory.

Across a network, you can use a separate share for your data directory. Assuming that you're in an MS Network environment, shares that end in '$' do not appear in the Network Neighborhood Browser, but can be accessed explicitly, IOW, if I have two shares on MyPC, C:\SomeDir with a sharename of YouSeeMe, and C:\AnotherDir with a sharename of InvisibleMan$, Network Neighborhood would only show the share YouSeeMe. You could still map drives to the hidden share (sort of a dumb thing to do if you're trying to hide it) or reference things explicitly by UNC. VFP can use UNCs for file paths, VFP 5 & 6 can SET DEFAULT/CD to a UNC, and UNCs can be mixed with drive letter/path entries in a SET PATH statement. IOW, the following are legal, even though it's a hidden share:

USE \\MyPC\InvisibleMan$\MYDBF
SET DEFAULT TO \\MyPC\InvisibleMan$
SET PATH TO C:\AppDir;\\MyPC\InvisibleMan$;\\MyPC\YouSeeMe

Hiding a share has no effect on the local PC, which does not need to access the folder through the share name.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform