Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a windows 7 install to a SSD drive the hiberfil.sys file was created, I want to remove it. I not only have administration rights on the computer, I am the one administrator, having taken over the default admin.

As you can see in the CMD (top left), when putting in the command powercfg -H Off , it just says Invalid Parameters - - try "/?" for help, so I tried different caps/non-caps variations. See Administator there in the title.

enter image description here

Deleting: In the requester there (bottom left) You can see I attempted to delete the file, which tossed up This action cannot be completed because the file is open in another program

Settings: In the power options (right) you can see hibernation was turned off, and the computer had since been booted.

Explorer: In the explorer window (bottom) you can see the existance of the hiberfil.sys System file, as it resides on the root of the C: disk which is a partition of the SSD.

Why does the powercfg -H Off function not work to remove the hibernation file, when i am the administrator?

share|improve this question
1  
You could try the registry method explained in this link: sevenforums.com/tutorials/819-hibernate-enable-disable.html (obviously at your own risk) – Yass Sep 15 '13 at 0:21
2  
Does powercfg /h off work? – Rik Sep 15 '13 at 0:43
    
@rik Yes , Well that is odd because the help file shows -H , right now both methods are working. I had to RunAs the admin in this situation before any of them would, so if you answer , be sure to add RunAs to the answer as a possible need. – Psycogeek Sep 15 '13 at 0:49
    
Added my answer. I take it the "RunAs" command is the same as Right-click/Run as administrator to run an elevated command prompt. – Rik Sep 15 '13 at 1:15
up vote 6 down vote accepted

Sometimes powercfg needs a - and sometimes a / at the beginning of a parameter.

This Technet article for Windows 8 states a / and another older article a -. (Which has worked since Windows XP).

For me (Windows 7 Ultimate 64bit) both variations work. In the second article one user stated (with the same configuration) he had trouble with the - where / worked. So the reason is still a mystery.

To run the command you can click start, type cmd, and right-click cmd.exe on the top and choose run as administrator (or you won't have elevated rights to perform the command).

share|improve this answer

Try the following:

powercfg -hibernate off

This is how I solved it in my case.

share|improve this answer

In my case I was getting "Invalid Parameters" for powercfg /devicequery wake_armed on Windows 8.1. After looking at the options by typing powercfg /? devicequery, I copied the example which uses all caps for all except the query flag:

POWERCFG /DEVICEQUERY wake_armed

That worked. So maybe POWERCFG /HIBERNATE off would work in your case.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .