Advertisement

11.24.2005 at 10:57AM PST, ID: 21642465
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

running script as system

Asked by daniel416 in Visual Basic Programming

Hello,
My objective is to create single-use accounts on an AD server.
I am able to create accounts in AD with an application I made in C#. I want the accounts to be disabled after the user logs-in the first time, that way the accounts can only be used once.

I thought about running a logon script that I put in the Group Policy for that OU. It works when I run it, for my account for example, but I'm admin.

I'd like this script to run from the newly created account.
It makes sense that an Authenticated Users cannot disable their own accounts. I've been reading about elevating script privileges so that they can perform these kinds of tasks, but haven't been able to make it work.

Here's the script that disables the account it's running from. Again, only works for admins (one would hope!).
Also, if anyone has any suggestions of where to post a pointer to this question...

Thanks in advance
daniel416

=========
Option Explicit

Dim objNet
Dim currentADGroup
Dim currentADUser
Dim userName, groupPath

Set objNet = WScript.CreateObject("Wscript.Network")
groupPath = "LDAP://OU=test,DC=mysite,DC=com"
userName = objNet.UserName

Set currentADGroup = GetObject(groupPath)
Set currentADUser = currentADGroup.GetObject("user", "CN=" & userName)

currentADUser.AccountDisabled = true
currentADUser.SetInfo

Set currentADUser = Nothing
Set currentADGroup = Nothing
Set objNet = NothingStart Free Trial
[+][-]11.24.2005 at 05:21PM PST, ID: 15358625

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.25.2005 at 07:09AM PST, ID: 15360952

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.25.2005 at 07:33AM PST, ID: 15361096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.25.2005 at 07:44AM PST, ID: 15361201

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.25.2005 at 08:40AM PST, ID: 15361578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.25.2005 at 10:03AM PST, ID: 15362141

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.28.2005 at 12:31PM PST, ID: 15375409

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.28.2005 at 04:59PM PST, ID: 15376879

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.01.2005 at 06:40AM PST, ID: 15396408

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.01.2005 at 05:22PM PST, ID: 15401820

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.02.2005 at 07:05AM PST, ID: 15405040

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.02.2005 at 09:47AM PST, ID: 15406510

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.02.2005 at 09:48AM PST, ID: 15406516

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.02.2005 at 08:05PM PST, ID: 15409846

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12.06.2005 at 10:51AM PST, ID: 15430170

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 3
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32