Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I was in AD, the parameters would look like:
objUser.ConnectClientDrivesAtLogon = Enabled
objUser.ConnectClientPrintersAtLogon = Enabled
objUser.DefaultToMainPrinter = Enabled
objUser.TerminalServicesInitialProgram = "something"
objUser.TerminalServicesWorkDirectory = "c:\something"

But these don't work when not in AD. How do I programmatically set these values for local, non-AD users?

I'm not tied to vbscript, if you know of another way to do it.

share|improve this question

Those properties are not defined for accounts on a local computer.

Are the values going to be the same for every user? You could just configure the per-computer settings on your terminal server.

share|improve this answer
They will not be the same for every user. The values I'm trying to set are the checkboxes and fields on the Environment tab of a local Windows user. – SeanFromIT Feb 3 '12 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.