|
-
Dec 5th, 2000, 04:16 PM
#1
Thread Starter
New Member
What would be the best kind of module to run when a program boots up to check that there are permissions in place for a user to access a drive on a server. We don't want the drive mapped so don't go that route.
I also want it to happen within the Form_Load() sub.
Since the program will be replacing a file in a network directory, i was thinking of killing two birds with one stone by moving the old file (for backup purposes) to a different directory, and then putting the new one in its place when the program is run. If I can't move the existing files, then permissions aren't in place, and an error is returned.
Is this the best way to do it, and if so, how would I code the move statements?
Thanks,
A
-
Dec 6th, 2000, 05:45 AM
#2
Lively Member
This might not seem that usefull
What you need is ADSI downloadable from Microsofts web site.
With ADSI you can look at a network like a directory you can create new users look at user permissions etc.
The following code shows how you could map all the PC's and the users profiles set on the PCs that are on a Domain
Set WshNetwork = CreateObject("WScript.Network")
Set WshGroups = CreateObject("Scripting.Dictionary")
WshGroups.CompareMode=vbTextCompare
DomName = WshNetwork.UserDomain
Set DomComp = GetObject("WinNT://" & DomName)
DomComp.filter = Array("computer")
For each Computer in DomComp
msgbox Computer.Name
Set ComputerLogon = GetObject("WinNT://" & DomName & "/" & Computer.Name)
ComputerLogon.filter = Array("user")
For each User in ComputerLogon
msgbox Computer.Name & "-" & User.Name
Next
Next
There is lots of information available on this subject
Hope this helps
Ian Frawley
Software Engineer
E-mail [email protected]
BEING IN THERAPY
And yet, having therapy is very much like making love to a beautiful woman. You... get on the couch, string 'em along with some half-lies and evasions, probe some deep dark holes, and then hand over all your money.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|