[Fix] Can’t Create Tasks to Display Messages in Windows 8 Task Scheduler

share this: facebook | twitter | google+ | reddit | tell a friend

NOTE: This tutorial has been created specifically for Windows 8 but it should also work in previous Windows versions such as Windows 7, etc.

SUMMARY:

Task Scheduler is a built-in program in Windows OS which allows you to schedule tasks and reminders. In previous Windows versions you could create tasks to show messages, send emails or launch specific programs at scheduled time but Microsoft has removed the ability to display message and send email using Task Scheduler in Windows 8. Windows 8 Task Scheduler only allows you to create tasks which can launch programs, that's it. Display message and send email features are now deprecated in Windows 8.

This tutorial will help you in getting these removed features back in Task Scheduler of Windows 8.

DESCRIPTION:

Personally I love "Task Scheduler" program in Windows. I have approx. 20 scheduled tasks in Task Scheduler and it helps me a lot in doing the things on time. I have tried many free task scheduling software in past but the built-in Task Scheduler of Windows is the best among all. Its very simple and easy to use and it does its task perfectly.

Also it allows you to backup and restore your tasks so that you don't need to create the tasks again if you format Windows or want to set the same tasks on a new computer system. You can simply restore your tasks without any headache. We also posted a tutorial in past which helps you in restoring all your tasks quickly and easily in a single click. You can read the tutorial at following link:

How to Import (Restore) All Tasks in Bulk Using Task Scheduler in Windows?

I also have a backup of all my important tasks and I have created a batch script with the help of above mentioned tutorial to restore them quickly. Whenever I reinstall Windows, I restore all the tasks easily.

But the problem occurred when I tried to restore the tasks in Windows 8. When I ran the batch script, it showed following error message:

ERROR: The task definition uses a deprecated feature.

Task_Scheduler_Deprecated_Feature_Error_Message.png

I didn't understand the problem at first so I decided to run the script as Administrator but no benefit. I double-checked the syntax of commands in the script, I checked each and everything but I got the same error every time I tried to run the script.

Then I decided to manually import the backup tasks using Task Scheduler program. I clicked on import tasks option and selected a task to restore but again Task Scheduler showed following error message:

An error has occurred for task Take medicine. Error message: The following error was reported: 2147750704.

Task_Scheduler_Error_Message.png

I was clueless why were the tasks not getting restored in Windows 8? I never had any such problem while restoring the same tasks using the same method in Windows 7. I tried to set the "Configure for" option of the task to Windows Vista or Windows 7 but it also didn't help.

So I decided to investigate the issue and tried to create a new task manually in Windows 8 Task Scheduler and then I found the culprit. Actually Microsoft has removed 2 features from Task Scheduler of Windows 8:

  • Display a message
  • Send an e-mail

Now you can't create a task in Task Scheduler of Windows 8 to show a message or to send an email. When you create a task and go to the "Actions" tab to set an action for the task, you see following:

Display_Message_Send_Email_Features_Deprecated_Task_Scheduler.png

As you can see both "Display a message" and "Send an e-mail" options show "(deprecated)" text which means both features have been removed from Windows 8. I can't understand why did Microsoft remove these important features?

Now you can only start a program with Task Scheduler, you can't set it to show message or send emails. That's why when I was trying to import my tasks which were set to show message, Task Scheduler and batch script were showing error messages because this feature has been removed from Windows 8.

"Display a message" was an essential part of Task Scheduler. Without this feature Task Scheduler in Windows 8 is quite useless. We usually schedule a task to remind us about an important event and showing a message for that event is the easiest way to remind.

If you also use Windows Task Scheduler and if you are using Windows 8 but missing the show message feature, this tutorial will definitely help you.

Today in this tutorial, we are going to tell you a simple way to force Windows 8 Task Scheduler to show message for tasks.

HOW-TO INSTRUCTIONS:

Although Microsoft removed the feature to show message using Task Scheduler but we can use the built-in "Command Prompt" or "PowerShell" programs to show message in our tasks. We'll set Task Scheduler to start PowerShell or Command Prompt as the program and will provide required commands to show our desired message as program's arguments.

So without wasting time lets start the tutorial:

1. First of all open Task Scheduler. You can open it using Start Screen by just typing task and Windows will show Task Scheduler in search results. You can also directly launch it by runningĀ taskschd.msc command from RUN box.

2. If you want to create a new task, click on "Create Task" link given in right-side pane. If you want to import an existing task, click on "Import Task" link.

Now there are 2 different methods to show a message for the task:

  • Using Command Prompt
  • Using PowerShell

You can choose any of the 2 methods according to your requirements. We are sharing both methods:

METHOD 1: Using Command Prompt

To set the task action to display a message, go to "Actions" tab, click on "New" button (or click on "Edit" button if you are editing the imported task) and type msg in "Program/script" textbox and in "Add arguments" textbox paste following string:

* Your_Desired_Message

NOTE: You'll need to replace Your_Desired_Message with the message which you want to show inside message box i.e. message body as shown in following screenshot:

Show_Message_Using_MSG_Command.png

That's it. Now Task Scheduler will allow you to create or import the task without any problem. Whenever the scheduled time comes, you'll see the desired message as shown in following screenshot:

Task_Scheduler_Message_Running.png

NOTE: If you want to directly modify the XML file of the task (which you got after exporting your tasks) to replace deprecated display message command with the new msg command, you can do it as well using following steps:

1. Open XML file and scroll down to bottom and you'll see following piece of code:

<Actions Context="Author">
<ShowMessage>
<Title>Your_Message_Title</Title>
<Body>Your_Message_Body</Body>
</ShowMessage>
</Actions>

2. Just replace the above code with following:

<Actions Context="Author">
<Exec>
<Command>msg</Command>
<Arguments>Your_Message_Body</Arguments>
</Exec>
</Actions>

Again you just need to replace Your_Message_Body with your desired message. Save the XML file and you'll be able to import it in Windows 8 Task Scheduler. Also the batch script will no longer show any error message.

METHOD 2: Using PowerShell

If you don't want to use msg command or if the msg command doesn't work for you, you can take help of PowerShell command.

When you open "Actions" tab, click on "New" button (or click on "Edit" button if you are editing the imported task) and type powershell in "Program/script" textbox and in "Add arguments" textbox paste following string:

-WindowStyle hidden -Command "& {[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Your_Desired_Message','Your_Desired_Title')}"

NOTE: You'll need to change only 2 things in the above mentioned string which have been given in bold letters. Replace Your_Desired_Message with the message which you want to show inside message box i.e. message body and replace Your_Desired_Title with the desired title which you want to show in message box titlebar.

Set_Powershell_Program_Task_Scheduler_Action.png

That's it. Now Task Scheduler will allow you to create or import the task without any problem. Whenever the scheduled time comes, you'll see the desired message as shown in following screenshot:

Task_Scheduler_Task_Running.png

You'll also see a command prompt window for a second just before the task message is shown on screen, don't worry its the main PowerShell window which we are using to show the message. Since we have set the window style to hidden in our task command, it shows and disappears within seconds. It should not be an issue at all.

NOTE: To directly modify the XML file of the task, just follow these simple steps:

1. Open XML file and scroll down to bottom and you'll see following piece of code:

<Actions Context="Author">
<ShowMessage>
<Title>Your_Message_Title</Title>
<Body>Your_Message_Body</Body>
</ShowMessage>
</Actions>

2. Just replace the above code with following:

<Actions Context="Author">
<Exec>
<Command>powershell</Command>
<Arguments>-WindowStyle hidden -Command "&amp; {[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Your_Message_Body','Your_Message_Title')}"</Arguments>
</Exec>
</Actions>

Again you just need to replace the 2 entries mentioned in bold with your desired message and title. Save the XML file and you'll be able to import it in Windows 8 Task Scheduler. Also the batch script will no longer show any error message.

That's it. I hope it'll help Windows 8 users who were missing the display message feature of Task Scheduler...





Posted by: | Categories: Troubleshooting, Windows 8 / 8.1


Other similar articles that may interest you


Comments

Leave a Comment

(required)