Category Archives: Work

Windows Task Scheduler: The directory name is invalid. (0x8007010B)

Ran into an interesting little problem this morning with getting a job to run in the Task Scheduler of a Windows Server 2008 server with Service Pack 2 installed.

Every time I tried to run the job I would get the error message “The directory name is invalid. (0x8007010B)”.

In looking at the Actions for this Task the “Start in (optional)” field was filled in with the correct path name:

“C:\Program Files (x86)\BLAH\”

I thought it might be the trailing backslash problem, so I removed it.  Same error message.

Turns out it is the quotes that are causing the problem here as the “Start in (optional)” field just doesn’t support them.  Take out the quotes and your task should run just fine.  You can set this directory with or without the trailing backslash and it will still work.

Here’s what my corrected Action looks like in the Task Scheduler.

Corrected Task Scheduler Job

Disable Client Popup Message for SCCM Task Sequences

By default an advertised Task Sequence in SCCM (Microsoft System Center Configuration Manager) will popup a message on the client workstation indicating that there is a new application that is available to be run. This is sometimes not desirable. By default it is possible to turn off notification for a regular Software Distribution Program in SCCM via the GUI by checking the box on the Program for “Suppress Program Notifications”. This GUI option is not available from a Task Sequence, but can manually be added via VBScript.

The value that we are adding to the ProgramFlags setting is 0x00000400 (which in decimal is 1024). You can find more details about the ProgramFlags from here.

Here’s the basic process:

1. Copy the following script to your SCCM server and save as “DisableTaskSequencePopupMessage.vbs”

‘Disable the popup message on a client workstation for a Task Sequence
‘Run this VBScript on your SCCM server
strSMSServer = “.”
‘Set COUNTDOWN value to 0x00000400 in HEX
COUNTDOWN = &H00000400

Set objLocator = CreateObject(“WbemScripting.SWbemLocator”)
Set objSCCM = objLocator.ConnectServer(strSMSServer, “root\sms”)
Set Providers = objSCCM.ExecQuery(“SELECT * From SMS_ProviderLocation WHERE ProviderForLocalSite = true”)
For Each Provider in Providers
If Provider.ProviderForLocalSite = True Then
Set objSCCM = objLocator.ConnectServer(Provider.Machine, “root\sms\site_” & Provider.SiteCode)
End If
Set TaskSequencePackage = objSCCM.ExecQuery(“SELECT * FROM SMS_TaskSequencePackage”,,48)
For Each PackageID in TaskSequencePackage
PackageIDS = PackageIDS & VbCrLF & PackageID.PackageID & ” – ” & PackageID.Name
strTSID = InputBox(“Please enter the packageID that corresponds to your Task Sequence:” & vbCrLF & PackageIDS)
If strTSID = “” Then WScript.Quit ‘Detect Cancel
If strTSID <> “” Then Exit Do ‘Detect value strTSID.
‘MsgBox “You must enter a numeric value.”, 48, “Invalid Entry”
Set objProgram = objSCCM.Get(“SMS_TaskSequencePackage.PackageID='” & strTSID & “‘”)

OldProgramFlags = objProgram.ProgramFlags
ProgramFlags = objProgram.ProgramFlags
ProgramFlags = ProgramFlags OR COUNTDOWN
MsgBox “Flag for ” & strTSID & ” currently set to ” & OldProgramFlags & ” (HEX: 0x” & HEX(OldProgramFlags) & “)” & vbCrLF & vbCrLF & “Adding 0x00000400 (COUNTDOWN. The countdown dialog is not displayed)” & VBCrLF & vbCrLF & “Set flag to: ” & ProgramFlags & ” (HEX: 0x” & HEX(ProgramFlags) & “)”,,”SUCCESS!”
‘ see ConfigMgr SDK for details (“SMS_Program Server WMI Class”)
objProgram.ProgramFlags = ProgramFlags

2. Run the VBscript. You’ll be prompted with a list of the Task Sequences. Type in the name of the task sequence you want to change (e.g. NYC000279) and hit OK.

3. You should see a response like the following:

Flag for NYC00279 currently set to 152084496 (HEX: 0x910A010)

Adding 0x00000400 (COUNTDOWN. The countdown dialog is not displayed)

Set flag to: 152085520 (HEX: 0x910A410)

4. Then advertise the Task Sequence and the Task Sequence will not popup any messages on the client workstation.

5. NOTE: This version is improved in that it prompts you for the task sequence ID and also now “OR’s” the value together rather than just blindly adding 1024 to the value every time the script runs, so you can safely run this script multiple times without any issues on the same Task Sequence.


Workaround to disable notification for task sequence?
Notifications for virtual packages

Allow WSJ.COM to bypass email spoofing rules

By default my firm blocks email spoofing using Mimecast. You can’t send a message from the Internet and claim that it is from our internal domain names. Occasionally we’ve had to make exceptions to the rules for particular public web sites that use email spoofing to send out email messages. Today’s case was The Wall Street Journal. If a user registers with an internal domain name email address and then tries to send an article to themselves, WSJ nicely uses the email address: but when sending to anyone else it uses the registered users email address. When they send to another person at the firm, the email is bounced.

After some back and forth with WSJ support, they were able to provide me the external IP addresses that they use to send email:

Once we put those IP addresses in our Mimecast configuration the messages were no longer bouncing. Ideally web sites should NEVER spoof someone’s email address, but at least the IP addresses to allow it to work are available.