OSD Custom action run as different user account
Hello,We are using a vbscript that reads ts variables and places the computeraccount in AD groups according to these variables. The script performs logging under c:\windows\temp. If I run the script as part of a software installation ( I created a program with the vbscript as commandline ) then this works. I get the logging but the computer account does not get added to the AD group due to insufficient rights ( local system account of computer does not have the right to add computeraccount to these groups )So i tried creating a custom task and use a different account to run this custom task. The vb script then gets started but I am unable to read the ts variables ( access denied ). The user account I am using is the domain administrator so normally the account has all the necesarry rights.Has anyone got any experience with a similar issue ?PS I have read http://social.technet.microsoft.com/Forums/en-US/configmgrosd/thread/1737c7b1-fdf7-4e3c-a9cf-2acf6aff30cb
September 28th, 2009 9:53pm

Hello, I am not sure why the domain account is not able to get the ts variables. One suggestion is to divide your actiona between getting the ts varialbes and adding the computer account to AD. You can run the first command without domain admin (regular run command action) to get the ts variales and then run your VB scrip to write the computer account using the runas commandline to add computer to AD. This is in the same TS no need to create two TSs. Thanks, Mahmoud - MS - Configuration Manager test team
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2011 12:37pm

You can pass the value of TS variables to your script using the %variable% syntax on the command-line in a command-line task. Thus your command-line you be something like cscript myscript.vbs /myvariable=%variable% and then you can access the values using the Wscript.Arguments object.Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys
November 19th, 2011 2:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics