Volume Activation through SCCM OSD TS ERROR

Hi,

I added one task to run:

Type: Run Command Line

Command Line: cscript c:\windows\system32\slmgr.vbs /ato

Start in: c:\windows\system32

Run this step as the following account: a domain admin account

The image is already having MAK key.

And this is the last task in the task sequence.

The error I am getting is:

CScript Error: Can't find script engine "VBScript" for script "c:\windows\system32\slmgr.vbs".

Because of this error it is not activating the machine. And the task sequence execution aborts with error: Failed to run the action: Activate Windows. Execution has been aborted

Fortunately, this is the last task in TS.

The same task ran successfully in Baremetal Task Sequence and activated the newly installed OS.

Please help.

Regards,

Amit Anand

 

Older Issue:

Initially, I had an image which was not having MAK key. I added two tasks: one for changing the key to MAK key and second to activate windows. There also, the task for changing the key used run successfully all the time, but activate windows task used to give problem (success for some time and failure for some time)

 

  • Edited by Amit Anand Tuesday, April 06, 2010 6:50 AM
April 5th, 2010 2:58pm

is this 32bit or 64bit ?
Free Windows Admin Tool Kit Click here and download it now
April 5th, 2010 3:54pm

Hello Niall,

 

Its windows 7 Enterprise 32 bit.

 

Its strange, because same task ran successfully in Baremetal TS.

 

Also, when the image was not having MAK key, the first task which changes key runs successfully. Just after that, 2nd task doesn't run, throwing same error.

 

Amit

April 5th, 2010 7:22pm

any reason why you arn't using KMS to handle the activation ? that's the preferred method, I havn't tried doing it the way you are doing it, does your SMSTS.log give you any clues to the failure
Free Windows Admin Tool Kit Click here and download it now
April 5th, 2010 11:13pm

No particular reason for not using KMS.

The client insisted on using MAK key.

 

Also, the error messages I am getting is from SMSTS.log file only.

CScript Error: Can't find script engine "VBScript" for script "c:\windows\system32\slmgr.vbs".

Because of this error it is not activating the machine. And the task sequence execution aborts with error: Failed to run the action: Activate Windows. Execution has been aborted

 

The strange thing is the same activation task worked in Baremetal TS.

 

Is there any method, we can activate windows 7 (MAK Key) for a mass deployment ??

Please help.

Regards,

Amit


April 6th, 2010 9:27am

The real problem is I am not able to execute the vbscript.

I am only running a command line, which in turn runs a script.

Its other thing that the purpose of the script is to activate the OS.

 

Please help.

Regards,

Amit

Free Windows Admin Tool Kit Click here and download it now
April 6th, 2010 12:34pm

CScript Error: Can't find script engine "VBScript" for script "c:\windows\system32\slmgr.vbs".

My favorite search engine came back with the following troubleshooting step (re-register vbscript.dll): "regsvr32 /s %SystemRoot%\System32\vbscript.dll"
I don't kow if that will help in your scenario but it's worth trying.

April 6th, 2010 1:06pm

Hi Torsten,

 

Re-registering vbscript.dll worked, (checked only once).

 

Please let me check 2-3 more times, because the same task was working on baremetal TS without re-registering the dll.

 

Regards,

Amit

Free Windows Admin Tool Kit Click here and download it now
April 9th, 2010 2:08pm

If anyone is struggling with this problem, and is not able to run a script under a given user in a windows 7 task sequence.

Can't find script engine "VBScript" for script. We have had huge problems with this in a standard windows 7 image. Nothing worked! 

We tried to reregister vbscript.dll but to no avail. 

We got it solved after opening a case with Microsoft support. Here is the solution:

"I would suggest you to perform a test with setting this value as 1 before running the script in Task Sequence. You can probably add one more command line before running the Task Sequence with following entry.

 

REG ADD HKLM\SOFTWARE\Microsoft\COM3 /v REGDBVersion /t REG_BINARY /d 010000 /f

 

If this works then probably the solution would be to export the reg key before running the script and set a value as 1 and then again restore it back"

This works for us every time! 

  • Proposed as answer by Anders Horgen Sunday, April 24, 2011 9:03 AM
February 7th, 2011 9:33pm

Out of a sudden we encounter this problem in Windows 7 OSD Task Sequences too.

Didn't find the reason so far, but regarding to your answer could it be caused by an actual Hotfix / SP1?

 

Thanks for your help

Free Windows Admin Tool Kit Click here and download it now
March 11th, 2011 4:45pm

Hello Mansoft TBA!

Thanks for your sharing on this topic!

I have been struggling a lot with this, as I have not understood why I suddenly was not able
to execute VB Script in my Task Sequence, where SMSTS.log reported:
CScript Error: Can't find script engine "VBScript" for script "c:\_SMSTaskSequence\WDPackage\scripts\script.vbs".

After reading your post, I discovered that "REGDBVersion" was set to 06 00 00 00.
By reseting the value back to 010000 prior to executing my script in the Task Seqeuence, I managed to get the script to work!
Thanks a lot, you saved my day!

Hence, I wanted to understand what the root cause was, so during my OSD Deployment I opened Registry
and monitored the value of REGDBVersion. In my case I discovered that it was VMWare Tools that changed this value.

Best Regards
Anders Horgen

April 24th, 2011 12:08pm

CScript Error: Can't find script engine "VBScript" for script "c:\_SMSTaskSequence\WDPackage\scripts\script.vbs".

The last update to SCCM requires that when you run vbscript you must preface it with the cscript.exe so your line should be

 cscript.exe c:\windows\system32\slmgr.vbs

Once we started doing this all of our VBS ran ok.

Hope this helps,

Alan

 

 

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 1:27am

Hello SuperMoe,

Ref my comment above, the commandline includes cscript.exe "%deployroot%\scripts\Script.vbs".
In our case it was WMVare tools that caused this issue.

Best Regadrs
Anders Horgen

June 24th, 2011 10:33am

The fundemental issue here is with UAC.

If you have UAC turned on and run a script from Explorer RCing on it then selecting "run as administrator", it WILL NOT have access to anything in the C:\Winnt\System32 dir including dll's for powershell, vbs, printers, etc.

If, however, you do a Runas into CMD.Exe then run it from CMD.EXE first, it runs fine.  This can be scripted if you like and knowing the scripting method to make it work is a pain in the rear to research so I'll give it to you below. 

Runas /profile /user:fabrikam\kenmyer "cscript.exe \"C:\Documents and Settings\kenmyer\Scripts\test.vbs"

See that \" there?  That's one of those awesome undocumented things Microsoft likes to throw into your life to make it miserable.  This "security functionality" in UAC is another instance of that, as is the "highly secured" temporary internet files directory.  Mount a windows HDD in linux and look there, then go back and look at it under explorer in windows; notice explorer hides things then gives very creative errors whenever you try to get in there?  Yeah, that's a drawback to the Windows 98 days when you could go into IExplore.exe and type in C:\ and, using the same exact binaries as explorer.exe, open up C:\ in the same window because they were the same program. That's what enabled websites to install viruses on people's machines in IE 5 and 6.  It's the same deal as with Office 2003 and Office 2007; in 2003 outlook uses the same binaries word 2003 uses to type up e-mails, in 2007 it's a completly seperate set of binaries.  Why?  Say I wanted to inject Normal.DOT with a Macro....

The above is part of the reason reregistering the vbs dll works, but only part of it.  Microsoft has taken steps to ensure applications run through explorer.exe don't get to access the gooey internals of windows because explorer.exe is a walking target board.

My Universal workaround is to place a windows CMD/CLI shortcut into C:\Windows\System32 called SUDO.cmd and you RC on that guy and hit properties, under the advanced button tell it you want it to always run as administrator.  That way I can hit Windows Key +R, type in SUDO, I hit yes to to the prompt and I have an admin console in front of me from which I can run admin tasks e.g. appwiz.cpl or compmgmt.msc, or run scripts without an annoying and broken runas.


AFAIK, Microsoft has never patched this "security feature" but given the history of security of MS Software I leave UAC on and leave it broken hoping some enterprising haxxor never figures out how to bypass it.  I also run everything from runas.exe or similar.

Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 4:45am

Thanks for this piece of info that was what was causing my vbscript to fail out on OSD was because of the VMWare tools.  Just moved the script above the VMWare Tools install and it is now working fine.
February 25th, 2015 8:03am

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

Other recent topics Other recent topics