Microsoft.SMS.TSEnvironment
Hi, i created a TS to install and capture server 2003. During the WINPE Setup I'm able to open a command promp using F8 and running the following script without any problems. dim osd: set env = CreateObject("Microsoft.SMS.TSEnvironment") ' You can query the environment to get an existing variable. logPath = env("_SMSTSLogPath") wscript.echo logPath Now if i try to run the script on windows during the TS is running (F8 - cscript.exe script.vbs) I get the following error. ActiveX Component can't create object : 'Microsoft.SMS.TSEnvironment ' Should this work or is this a context problem? Thank you
November 12th, 2010 9:38am

This should work. There are times when the COM object is not available so you may have just gotten unlucky and launched the cmd prompt at one of those times.Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2010 11:21am

Hi Jason, thanks for your reply. I tried this continuously on the server 2003 machine and on server 2008 without succes. I will try it again. Do you know if there is a TSVar of the current running packageID and ProgramName? Thanks Henrik
November 12th, 2010 11:38am

Sorry, in windows it will only work if you run the script from within the task sequence... for security reasons / Johan
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2010 7:04am

Thanks for your reply. It works fine within the TS. Good to know.
November 14th, 2010 6:27pm

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

Other recent topics Other recent topics