Quantcast
Viewing all articles
Browse latest Browse all 2206

New Post: Error during Enabling/Disabling task

(Win8 x64, .NET 4.0) I get the following error when I try to enable or disable a task using VB.NET:

"An unhandled exception of type 'System.Security.SecurityException' occurred in Microsoft.Win32.TaskScheduler.dll

Additional information: Tasks which have been registered previously with stored passwords must use the TaskFolder.RegisterTaskDefinition method for updates."

The code I use is very simple:
Dim t As Task = ts.GetTask(originaltask.Path)
            t.Enabled = True
            t.RegisterChanges()
I don't want to prompt for user name & password for enabling/disabling tasks.

What can I do?

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>