Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seting nt permisions

Status
Not open for further replies.

lordhuh

Programmer
Apr 25, 2000
96
US
how do i use vb (can i?) to set some nt permisions. also what do i have to keep in mind to be able to make a program on 98 and have it run on nt4.0? thanks Karl Pietri
lordhuh.pota.to

 
Here are some code links that might start you down the right path (unfortunately, you might not be able to test your code in less than an NT Server environment):

List servers users and groups: Add global groups to work groups: Enumerate users and groups; add and delete users from a group: Add, delete, change groups: Control bulk accounts; home directory, script path and others:
Sorry about the Win98 thing....
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Is there any way to get the Logged in domain name. I mean if we log in to a Accounts domain and use the resourses on a resourse domain, I need to get the accounts domain name. Is there any way to get this?
 
hmmmm that code helps some but i still need to find out how to change permisions on files/folders. Karl Pietri
lordhuh.pota.to

 
It can be done but you might be underestimating the size and complexity of the project you are proposing. This is best accomplished using the NT Server Administrative tools. If you insist on trying this with VB you stand a certain amount of risk. Give this a second thought before you start coding. There are plenty of commercial packages that have already worked out the bugs you will be forced to chase down.

Most of what intend to do must be performed through the registry. You can edit the registry remotely from the server (I won't go there in this forum) or you could make the changes on the local machine using an application running locally. One way to do this would be to create a hidden app, possibly designed to run on startup as a service process. The app will make provisions to provide a UI when an administrator is logged on to the machine, allowing the admin to set restrictions for a list of users in the \Software\Microsoft\Windows\CurrentVersion\Policies sub-key.

Your software can restrict the applications available to users with values placed in
\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun or it can do this by monitoring window titles and closing the ones that aren't authorized.

There are probably enough pre-written code samples in the FAQs in this forum to whip out a sub to perform the second method.

As I have noted, you certainly didn't decide on an easy project. I wish you best of luck.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top