Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - WScript.Shell -> Terminal Server 2008...

Reply
 
Old 02-26-2009   #1 (permalink)
Michael Bernau


 
 

WScript.Shell -> Terminal Server 2008...

Hi guys!

OS: MS terminal server 2008
user rights: remote desktop user / domain user

I have a question, which is related to the command "Set wshShell =
CreateObject("WScript.Shell")". It stops with the error "800A0046 access
denied". If the user has administrative rights, everything works well. but I
don't want to grant these rights to this type of user.

The WMI-command "Set oReg =
GetObject("winMgmts:{impersonationLevel=impersonate}!\\" & strComputer &
"\root\default:StdRegProv")" works fine.

It seems that the scripting works, but the command "CreateObject" doesn't.
The file "vbscript.dll" is on it's place, is registered and the read
permissions are correct, also for the "wscript.exe". Furthermore the command
"Set wshShell = CreateObject("WScript.Shell")" doesn't work, if I try to use
it in a script, which is started via the group policy setting
"computer/windows settings/scripts/startup". It seems that it only works
with administrative rights, although the system should even have the
required rights during the boot process, but it doesn't work. The script
should update a registry entry. The permissions are granted correctly. If
you try to do this with a WMI-"GetObject"-access (SetDWORDValue), everything
is running without any problem.

Is here anybody out there, who can kindly help me to resolve this problem?

Thank you for your help in advance.

Greetings, M. Bernau.



My System SpecsSystem Spec
Old 03-03-2009   #2 (permalink)
esska


 
 

Re: WScript.Shell -> Terminal Server 2008...

There should be policy to allow you to run this script under user
rights - maybe GPO hasn't have correct settings ?

If group policy doesn't work have you tried "runas" ?
My System SpecsSystem Spec
Old 03-03-2009   #3 (permalink)
esska


 
 

Re: WScript.Shell -> Terminal Server 2008...

BTW. I'm not sure if W2K8 has this option runas to run scripts under
user rights... try to check policy.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
WScript.Shell echo command? VB Script
Windows 2008 print server at terminal services - printer driver problem Vista print fax & scan
CAL for Windows Server 2008 in a Terminal Server environment .NET General
Powershell starts but never exits when invoked from Wscript shell PowerShell
Terminal service on Windows Server 2008 (Longhorn) Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46