key not valid for use in specified state java

I am trying to install Java on a PC with Windows 7 Professional 64 bit installed on it. Java was previously working properly but then asked for the update and when I went to install it I got this message. Tried uninstalling all versions of Java and then reinstalling but the same error came up. Any ideas on how to proceed would be greatly appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I downloaded java the other day to test run jdiskreport  again as it needed Java this is the question I posted the steps
So I know this one installs fine.

download free version here, I suggest you click on Do I have Java
This is the latest version.
Open the Help and check the solutions for problems

Top 15 Java Issues
1. Test Java
2. Troubleshooting tips for running Java
3. How do I uninstall Java on my Windows computer?
4. Why should I uninstall older versions of Java from my system?
5. Which Java download should I choose for my 64-bit Windows operating system?
6. Why do I see the Java Update Needed message: Java is out of date?
7. Why are Java applications blocked by your security settings?
 8. Java applets do not work after update to the Java 7 Update 65
9. How do I resolve problems running Pogo games?  
10. How do I disable Java in my web browser?
11. Printing issues with Java
12. Restore Java Security Prompts
13. Developer - Java Security Manifest Changes in the Browser  
14. Download errors: Corrupt MSI, File corrupt, Error 1305, Error 1606  
15. What are the Ask Toolbars?
NRTCFAuthor Commented:
That's the same version I was trying yesterday unfortunately. Clicking on help got me no where with that error. I couldn't find any references to "key not valid for use in specified state" when going to install java. I tried both the online and offline installers
No key required, what key are you referring to? C#??
Even Java Help doesn't recognise your problem.
key not valid for use in specified state??
In what circumstance?
Key not valid for use in specified state.
I don't understand what your doing and how you get to this error, please explain
If you're opening another users package or a package from another machine?
the packages have to be saved to allow storing of password data.
Don't know what to offer
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

NRTCFAuthor Commented:
All I was doing was trying to install java and I would get that message. It's been resolved though. A system restore took the computer back far enough to where whatever caused the problem was not installed on the PC yet. I was then able to update Java without getting that error message. Thank you.
Yes I understand, but why the key is my question?
Wonder what system restore restored? It doesn't restore personal deleted files  / saved files
so it must have been a program? you uninstalled? or moved?
There is system protection and system restore

System Restore can make changes to Windows system files, registry settings, and programs installed on your computer.
It also can make changes to scripts, batch files, and other types of executable files on your computer.
Personal files, such as documents, e‑mail, photos, and music files, are not changed.

System Restore protects your personal files by not restoring any files in the My Documents folder. It also does not restore any files that use common data file name extensions, such as .doc or .xls. If you're not sure whether your personal files use common data file name extensions, and you do not want the data files to be affected by System Restore, save them in the My Documents folder.
Desktop folders can be lost.
If a program was installed after the restore point that you are restoring to was created, the program might be uninstalled as part of the restoration process. Data files that are created with the program are not lost.
 However, in order to open the files again, you must reinstall the associated program.
For example
If you download a photo system restore will not move it.
However, if you install a photo viewing program on a Friday and then restore your computer to the state it was in two days earlier on Wednesday, System Restore will uninstall the program, and you won't be able to use that program to view photos.
NRTCFAuthor Commented:
I don't know what to tell you except I think it was a windows update that caused the issue, though I'm not sure how. Every Tuesday updates are installed on this computer and that is why Java was also updated. When it went to update and got that error message, it was then uninstalled. Every attempt to install it afterwards gave the error message "key not valid for use in specified state". I couldn't begin to tell you why, and I was hoping to find an answer myself. As a last resort I was able to restore the computer to a point prior to the windows updates going through and Java was updated successfully and then the rest of Windows updates were installed without incident. I'm still scratching my head as I have never seen that error in the hundreds of times I have installed Java.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Me either NRTCF,
possible causes, as you may know often times there is services programs running in the background.
You may see a message to close all open programs so they don't cross.
Lets say windows was updating/downloading updates and installing, at some point you may have tried to manually download this java from the web page we both used.
And this caused an overlap two installers got locked. That would explain it.
Our registry was saying there was two open installer trying to run.
So basically a system restore took you back prior to the windows updates and the download you did clearing the locked installers.
Back in XP I used a tool called windows cleanup tool , nolonger around. It was an msi installer cleanup.
Microsoft Installer cleanup, we in windows 7 now have windows Fix it for me from Microsoft
What happened to the Windows Installer Cleanup Utility (MSICUU2.exe)?
When downloading any programs just check your taskbar for any open programs and close them.
Sometimes we have to temporaily disable our AV to prevent it from blocking the installer.
I have removed java from my system as it represents a threat.
I received this news letter from Znet  6th August prior warning for the coming Tuesday updates>>Summary: Next week's Patch Tuesday updates will include a much-needed fix for Internet Explorer, blocking outdated versions of the Java ActiveX control and closing one of the most popular vectors for installing malware.
Microsoft to block outdated Java versions in Internet Explorer
NRTCFAuthor Commented:
I agree that that is a very possible cause to the problem, but unfortunately since I wasn't the person doing the updates, I cannot say for sure whether or not other installations where going on concurrently. I have also used the Windows installer cleanup utility and it has saved the day from time to time, but this was just an error that seemed to come out of left field. Just the lack of information for that error on an installation was astonishing. I just hope I don't encounter it again since I wasn't able to find an actual fix for the issue.
Well you did find a solution system restore, but as to what caused it ??
 look in your events errors windows should keep a log of all problems.
Occasionally check that white flag in your running tasks bottom right, Windows Action Center
 I do when I am encountering a problem I look first to what is running in my taskmanager then check the windows flag
Go to start search type in> reli
that stands for reliability monitor/ it will show you a graph of when problems occurred and what they were
NRTCFAuthor Commented:
I answered myself so I'm giving myself a C lol
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.