Running within an SCCM 2007 Tasksequence or not?

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. I was first thinking of looking for the existence of any Read More …