I recently received an error message stating that the “Keyset does not exist” for all scheduled tasks on a Windows 2003 server. This error caused the scheduled tasks from not running, and caused some problems with a few applications. This is the first time I had seen the error, and so I wasn’t sure what the problem was.
While I have experienced Microsoft Word Errors in the past, this was a first for cryptography in Windows 2003. The error caused the inability to view the “Run as” user ID, let alone change it to something else. Because of this, the tasks couldn’t run, so I had to find a solution to fix it. Fortunately, the solution was easy, and only took a few minutes to implement.
Keyset Does Not Exist Solution

The full error that I received when accessing the schedule tasks was:
The specific error is:
0×80090016: Keyset does not exist
An error has occurred attempting to retrieve task account information.
You may continue editing the task object, but will be unable to change the task account information.
I haven’t seen this error before, it it prevented my schedule task from running. I went online to see what I could find and eventually found a solution that worked for me. I outline the steps to the solution below.
Steps to Correct the Keyset Does Not Exist Issue
After performing some research, I found out that the local system private keys used by the “Cryptographic Services” service had become corrupted. I simply used the following steps to correct the issue:
- I stopped the “Cryptographic Services” service.
- I then double-clicked “My Computer”, and then clicked “Folder Options” on the “Tools” menu.
- On the “View” tab, I clicked “Show hidden files and folders”, and then clicked “OK”.
- I deleted all of the files in the “C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\S-1-5-18″ folder.
- I then restarted the “Cryptographic Services” service.
I’m not sure what actually caused the issue, but the above fix should be able to correct the error if it appears again. After performing the above steps, the “Keyset does not exist” error reported in the Task Scheduler had disappeared, and I could see and change the “Run as” user ID.
Tags: Scheduled Tasks, Solution, Windows






on February 18, 2011 at 10:40 am
Thanks – microsoft’s own kb was worthless for me in this instance – it showed me an article on win2k (not 03) that said to start a service and you should be good. well that service was already running, and it wasn’t the crypto service. thanks for this – saved me a bunch of time/hassle!
only thing i would add – for existing scheduled tasks that had stopped working, i had to go in and set the password for the user again. after that, the tasks would run – both on schedule and manually (right-click, run).
on June 7, 2011 at 2:47 am
Give persmission to Everyone on the C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys folder.
This should resolve the “Keyset does not exist” error.
on June 7, 2011 at 8:24 am
Thanks for an additional solution, Jay.
on July 11, 2011 at 4:18 am
I had the same problem with the Keyset does not exist issue. However after deleting the S-1-5-18 folder I now get 0×80070005: access is denied.
Anyone got any ideas?
on September 28, 2011 at 4:11 am
You shouldn’t have deleted S-1-5-18 folder, only contents of it.
on August 29, 2011 at 3:41 pm
From a programmatic point of view, I found this link to be EXTREMELY helpful:
http://code.google.com/p/libfenc/source/browse/trunk/pbc-0.5.8/arith/init_random.win32.c?r=55
This code sample presented my problem exactly and its solution, calling CryptAcquireContext with flag CRYPT_NEWKEYSET worked.
on September 21, 2011 at 5:24 am
Interesting. I never had this kind of problem before. But I guess this can be very helpful in case it happen.
Andrew Walker recently posted…Unique Golfing Experiences in Arizona
on October 28, 2011 at 1:53 am
THANK YOU! This did the trick
I’ve had this problem for so long and couldn’t find any way to fix it before I found your articel. My day just got better.
on October 28, 2011 at 8:31 am
No problem. I’m glad I could help.
on November 29, 2011 at 8:24 am
Thanks for the very informative tips.. it work wonderful..
on November 29, 2011 at 8:46 am
I’m glad it worked for you.
on January 18, 2012 at 1:39 pm
A less intrusive method I found using Paul’s findings was to check the ACLs on each file in the S-1-5-18 directory. One of the files had no permission entries. Not only that, the Summary tab was missing from the Properties dialog. The other files in that directory had entries for local Administrators (R/E) and SYSTEM (Full). To test my theory, I stopped the Cryptographic Services service, and added the following permission entires to the suspect file:
-(local) Administrators: Read, Read & Execute
-SYSTEM: Full Control
Restarted the Cryptographic Services service and checked my tasks.
Thanks Paul!
on February 22, 2012 at 5:48 pm
Good solution. The solution from MS was crap. In addition to your instructions I restarted the server but my backups still didn’t run. I then reentered the password on all my NTbackups. This seemed to work.
Timmmmmmmmmmmmmmmmmmmm