2/16/2011

Windows 7 SP1 Released

Windows 7 and Windows Server 2008 R2 Service Pack 1 is no available for download on MSDN

2/01/2011

vbScript - Get running environment

The following vbScript Function delivers the value true if the script runs within a task sequence environment. If not the functions delivers the value false. This function can be useful in scripts like wrapper and so on.

  1. ...  
  2. If RunningInTaskSequence = True Then  
  3. ...  
  4.   
  5. Function RunningInTaskSequence()  
  6.  On Error Resume Next  
  7.  Err.Clear  
  8.    Dim objTSEnv : Set objTSEnv = CreateObject("Microsoft.SMS.TSEnvironment")  
  9.  If Err Then  
  10.   'Script does not run within the Task Sequence environment  
  11.      RunningInTaskSequence = False  
  12.  Else  
  13.   'Script does run within the Task Sequence environment  
  14.   RunningInTaskSequence = True  
  15.  End If  
  16.  On Error GoTo 0  
  17. End Function  

Thanks to Mark Cochrane and Sherry Kissinger...

...for mention me in the new release of the RegKeyToMof v2.5 tool
Here's the associated blog entry