It is currently Thu Apr 18, 2024 3:09 am

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Thu Sep 17, 2015 8:19 am 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
Hello, I want to suggest an idea which is really cool and actually would work really nice:
As you know, when you enable Hibernate on your computer, it creates a huge file (C:\hiberfil.sys) just as big as the RAM you have in your computer. But why create and keep that big useless file? It's only good if you Hibernate the computer a lot, but completely useless for it to sit there taking up space.

For example, I have 8GB of RAM. If I enable Hibernate, it will take up 8GB of my hard drive space.

So I want to suggest to have an option to Hibernate in the Start Menu -> Shut Down, but that file (C:\hiberfil.sys) does not exist.
Yet, once you press the Hibernate option to put your computer to Hibernate, then that option would type this in a command prompt:
powercfg.exe -h on

That would enable Hibernate (create a huge file as big as your memory RAM), and put your computer to Hibernate.

Once you turn on the computer, have Classic Start Menu detect that it created that file when you clicked the Hibernate option, and run another command:
powercfg.exe -h off

To turn off Hibernate (and delete that huge useless file that's only good for Hibernate)

Suppose you don't have enough space on the hard drive to create that file, then if someone wants to Hibernate their computer and press that Hibernate option, Classic Start Menu will say that it cannot create a file for Hibernate because of limited disk space or something, and offer to shut down the computer instead. Or even better, if there isn't enough space to create the Hibernate file, then have Classic Start Menu not even show that option at all.

So for example: If I have 117GB of 120GB full in my hard drive, I'll only see the "Sleep", "Restart", "Shut Down", etc.. options but Not "Hibernate".
Yet if I have 40GB of 120GB full in my hard drive, then I will also see "Hibernate" listed in the shut down options.

Don't you think this would be a cool idea?

Consider it please. Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 17, 2015 8:44 am 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
Classic Shell cannot modify the behavior of the Hibernate function in any way, Windows controls it completely. Classic Start Menu can only show it and execute it if it is enabled at the system level.

To save disk space, you can do another optimization instead:
You can reduce the amount of disk space that Windows uses for hibernation by taking advantage of the compression feature. The hibernation file can be a percentage of the total RAM. From an elevated command prompt, type: powercfg /hibernate size 50 or powercfg /hibernate size 65 (that number is the % of total memory). So if your total memory is 8 GB, it won't take all 8GB of disk space but only 50% of it=4 GB.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2015 12:59 am 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
Sorry for the late response, but thanks for the reply.

I'll check out what you said about the hibernate feature, but I must've not explained it too well.

What I meant to say was to have that "Hibernate" listed in the shut down list menu, and if I click it, Classic Shell would open some command that will run cmd.exe with the powercfg line. So Classic Shell will tell Windows to run that command, and Windows will try to run it.

If it's not possible, I guess its okay.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 26, 2015 7:07 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
I tried your suggestion 2 posts before this one. That's a really nice feature that I didn't know about. Thank you for posting that.

I wanted to see if I can minimize that number as much as possible, but apparently 50% (4 GB, for my computer) is the only possible lowest percentage I can set for the Hibernate file. I would've loved to make it go down to 25% (2 GB) or so, but that sets it to 4 GB (which is 50%).

Thank you for the suggestion, and I hope other people who read this find this useful as well.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 30, 2015 12:53 am 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
Here ya go! I actually figured it all out!!! There's only one little set back about it that I cannot figure out:
• You must press Ctrl+Shift when clicking Hibernate, that's it!
Like I said, if this feature gets implemented into Classic Shell, that would be great. Let me give you the tutorial on how I did this using research and logic:

Thanks to these helpful guides:
1) http://www.instantfundas.com/2008/08/en ... on-on.html
2) http://superuser.com/questions/321151/h ... d-shutdown

Here we go
1) Open Notepad and paste this in there:

powercfg /hibernate on
shutdown /h

2) Save this file as: Enable Hibernate & Hibernate Computer.cmd
(Make sure to get rid of the .txt extension)

3) Open Notepad and paste this in there:

powercfg /hibernate off

4) Save this file as: Disable Hibernate.cmd
(Make sure to get rid of the .txt extension)

5) Put these two files somewhere safe where they won't get deleted
6) Search for and open: taskschd.msc
7) Create Task...
Name: Disable Hibernate
Check: Run with highest privileges
8) Under Triggers, press New
Begin the task: On an event
Log: System
Source: Power-Troubleshooter
Event ID: 1
9) Under Actions, press New, press Browse & select: Disable Hibernate.cmd
10) Save all that
11) Right click your Start button -> Settings -> Check Show all settings -> Customize Start Menu -> Double click Hibernate (on the left side)
12) Command: Browse for and select "Enable Hibernate & Hibernate Computer.cmd"
13) Save all, and that's it! Just make sure to press Ctrl+Shift and click Hibernate. If you only click, nothing will happen.

Summary: When you Hibernate, a hiberfil.sys gets created in C:/ and you computer will Hibernate. Once you start up the computer from Hibernate, that file will get deleted. That's it!

Nice.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 08, 2015 2:56 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
The whole point of this idea is to avoid keeping the big hiberfil.sys file sitting in your hard drive, so you can have a few more GB of space to use. I am curious, has anyone found my previous post useful at all?


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 05, 2015 4:19 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
Is there a way that when I click that "Hibernate" link, I could have Classic Shell automatically press Ctrl+Shift for me with the click of that link? Is there some code that I can put in that link's settings to do that for me?

Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 05, 2015 6:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
I don't know why Ctrl+Shift affects the behavior of Hibernate, but the start menu can't press keys.
If you find a command that gets the same behavior you can hook it as a custom menu item.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 06, 2015 10:49 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
Hi, I was actually referring to my long post above. I created that "Hibernate" link as a custom link to open a ".cmd" file (Take a look at that post above). Is there any way that I can make an extra custom command in Classic Start Menu that can hold down Ctrl+Shift when I click that certain customized "Hibernate" link?


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 07, 2015 8:02 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
Ah, I think I understand. Ctrl+Shift makes it run as admin. You can create a shortcut to the .cmd file and mark it as requiring admin access. Then you don't have to press Ctrl+Shift.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 07, 2015 12:02 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
You're right, sorry if I didn't mention that Ctrl+Shift makes it run as an admin. Yes that's the whole reason for the Ctrl+Shift. And I've actually tried what you posted; I made a shortcut to the .cmd file and set it to always run as admin, and I made Classic Start Menu settings to run that shortcut to that .cmd file, yet it didn't work for some reason. Did I set it up incorrectly somehow? If you have time, can you please try it all out and see if you can make it work?


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 08, 2015 10:20 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
Hm, a quick test on Windows 7 shows that the "run as admin" setting is grayed out for cmd files. You may have to find a way to create an exe. There are few systems out there to convert scripts into exes. I'm not very familiar with them.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 08, 2015 11:28 am 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
I have Windows 8.1, and the same thing applies here; the "run as admin" setting is also grayed out. So I actually created a shortcut to that .cmd file, and was able to set the shortcut to run as admin. Yet the odd thing is that I let Classic Start Menu run that shortcut instead, but still didn't work which was rather odd; Can you please try that out real quick and see if the same thing applies on your end?
But thanks for this suggestion of converting the cmd file to an exe. I never thought of that idea, so I'm gonna look around for something that could do that and have that exe run as administrator. Thanks for that suggestion.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 08, 2015 7:57 pm 
Offline

Joined: Mon Apr 20, 2015 11:29 pm
Posts: 30
YES! Thank you so much for your suggestion, because I found a program to convert the 'cmd' file to an 'exe' file (http://f2ko.de/en/b2e.php) .
In the 'exe's properties, I set it to run as an administrator! Now I can click on the start button, put the mouse on the arrow next to 'Shut Down...' and press 'Hibernate', and the computer hibernates!


So in summary, if anyone is reading all this:
I was able to make a command that lets you Hibernate your computer without having a huge hidden file located at C:\hiberfil.sys to exist at all when you're using your computer, which saves you a lot of disk space.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 100 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.