<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tasksequence on Anything About IT</title><link>https://www.verboon.info/tags/tasksequence/</link><description>Recent content in Tasksequence on Anything About IT</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 22 Dec 2011 19:18:52 +0000</lastBuildDate><atom:link href="https://www.verboon.info/tags/tasksequence/index.xml" rel="self" type="application/rss+xml"/><item><title>Running within an SCCM 2007 Tasksequence or not?</title><link>https://www.verboon.info/2011/12/running-within-an-sccm-2007-tasksequence-or-not/</link><pubDate>Thu, 22 Dec 2011 19:18:52 +0000</pubDate><guid>https://www.verboon.info/2011/12/running-within-an-sccm-2007-tasksequence-or-not/</guid><description>&lt;p&gt;I’ve been working on a batch script that runs as part of an SCCM 2007 TaskSequence or simply as a regular program. Because there were different conditions whether I run the script as part of a TaskSequence or just as a program and did not want to create two separate scripts I needed a way to detect within what environment the script is running.&lt;/p&gt;
&lt;p&gt;I was first thinking of looking for the existence of any &lt;a href="http://technet.microsoft.com/en-us/library/bb632442.aspx"&gt;_SMSxyz Task Sequence variables&lt;/a&gt; as they don’t exist when running a script within an advertised program, but that would have required some extra code I wanted to avoid. So I ended up with the code below.&lt;/p&gt;</description></item></channel></rss>