nsan3 Posted May 12, 2020 Share Posted May 12, 2020 Hi, My laptop is not retaining battery even when I shut it down at 100%. After 6-days, when I switch it back on, the battery level is at 30%, yeah I know. So I wanted to know if I can configure the Start Menu->ShutDown option to run a batch file (or) run a Shorcut. I intend to have the command in it -> shutdown /s /f /t 0 Thanks in advance. Link to comment Share on other sites More sharing options...
Dodel Posted May 12, 2020 Share Posted May 12, 2020 Are you putting the laptop to 'Sleep" instead of powering off possibly ? If you are not putting the laptop to sleep, and as you say it's not retaining charge, I would be more inclined to believe your battery or charger is at fault, how old is the battery, have you tried a different charger, have you re-calibrated the battery. It is pointless to run a batch file to force a shutdown with 0 delay, your are more likely to cause some software / registry corruption. Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 Thanks @Dodel, the battery is just 6-month old, have checked the charger, its working well. I did re-calibrate the battery recently. One of the IT guys at my workplace told me to maybe try the complete-shutdown method and see how it goes. But yes, am looking for more opinions from here. Link to comment Share on other sites More sharing options...
Tux 528 Posted May 12, 2020 Share Posted May 12, 2020 Hi! First, to run any Batch file before shutting down your computer, you can simply start it with the START command from another Batch file, to which you add the shutdown /s /f /t 0 command at the end. And to do the same thing at Windows startup, you can copy the shortcut (or the one in your batch file) that you want to execute to the shell:startup folder. EDIT: I'm sorry I didn't express myself well. I hope this will help you. Best regards Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 1 hour ago, Tux 528 said: Hi! First of all, to shut down your computer, you can simply write the commands from the batch file in question to another batch file, where you add at the end the shutdown /s /f /t 0 command. Then, you can copy the shortcut (or the one of your batch file) to the shell:startup folder so that it will be launched at Windows startup. I hope this will help you. Best regards So when I place the Shutdown batch file to the shell:startup folder, wouldn't my system just shut-down right after start-up? Am I mistaken or did you mean to say something else here? Link to comment Share on other sites More sharing options...
MrZeb Posted May 12, 2020 Share Posted May 12, 2020 14 minutes ago, nsan3 said: So when I place the Shutdown batch file to the shell:startup folder, wouldn't my system just shut-down right after start-up? Exactly! I would try to Disable Fast Startup https://help.uaudio.com/hc/en-us/articles/213195423-How-To-Disable-Fast-Startup-in-Windows-10 Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 2 minutes ago, MrZeb said: Exactly! I would try to Disable Fast Startup https://help.uaudio.com/hc/en-us/articles/213195423-How-To-Disable-Fast-Startup-in-Windows-10 Actually I do not even have the checkbox for "Fast Startup" on my system. So yes, that is not the problem. Link to comment Share on other sites More sharing options...
MrZeb Posted May 12, 2020 Share Posted May 12, 2020 Check the BIOS/UEFI some have also options for Fast boot or similar, another thing, in some machines its possible to have power on the USB ports to charge a Cell phone for example with the machine power off, some times this can be turned off on BIOS/UEFI if you don't need this feature. Link to comment Share on other sites More sharing options...
Tux 528 Posted May 12, 2020 Share Posted May 12, 2020 Hello, I'm sorry if I didn't express myself well... I've edited my previous message so you can understand it better. Regards Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 10 minutes ago, MrZeb said: Check the BIOS/UEFI some have also options for Fast boot or similar, another thing, in some machines its possible to have power on the USB ports to charge a Cell phone for example with the machine power off, some times this can be turned off on BIOS/UEFI if you don't need this feature. In the BIOS, there is a Quick Boot open but it was already Disabled. The USB Charge option is also Disabled in the BIOS. 6 minutes ago, Tux 528 said: Hello, I'm sorry if I didn't express myself well... I've edited my previous message so you can understand it better. Regards You do understand that placing files in the shell:startup folder triggers that file to execute at startup right? So what sense that it make to place a Shutdown script there? I understand you are trying to be helpful but it does not make sense to me. Thanks. Link to comment Share on other sites More sharing options...
Tux 528 Posted May 12, 2020 Share Posted May 12, 2020 We misunderstood each other. Therefore, I'll go back to the beginning. If I understand correctly, you want to configure Windows to run a batch file or shortcut when it starts, or before shutting it down. So I suggested that you create another batch file that just executes what you want before shutting down your computer. As far as startup is concerned, I advised you to copy the files / shortcuts to be started at the same time as Windows in the shell:startup folder (so a Batch file or a shortcut, if that's what you want). If you follow me, the Batch file that shuts down your computer has nothing to do with yours, it doesn't make sense to start Windows and shut it down directly afterwards. However, it might be simpler if you explain what you want to do before shutting down or restarting your PC so that we know exactly what you want to do. Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 @Tux 528 So what I wanted to say is, do you know the ShutDown option on the Start Menu? So I want to remap that ShutDown option to run a ShutDown batch file. Plain and simple. Thanks. PS: Please forget about the Startup, I did not say anything related to startup. Link to comment Share on other sites More sharing options...
Tux 528 Posted May 12, 2020 Share Posted May 12, 2020 Okay, I finally figured out what you were talking about. To do this, you need to configure the Local Group Policy Editor to run whatever you want at Windows startup and shutdown. However, this editor is not available on the Home versions of Windows but you can modify the Registry to access it... Then, you can access the startup properties and modify what you want. Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 4 minutes ago, Tux 528 said: Okay, I finally figured out what you were talking about. To do this, you need to configure the local Group Policy Editor to run whatever you want when Windows starts and stops. However, this editor is not available on the Home versions of Windows but you can modify the Registry to access it... Then, you can access the startup properties and modify what you want. Thanks, can you explain in a more detailed manner, so I can perform it on my Windows 10 Professional edition. Link to comment Share on other sites More sharing options...
Dodel Posted May 12, 2020 Share Posted May 12, 2020 Gpedit, as you run pro. https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd630947(v=msdn.10)?redirectedfrom=MSDN or https://stackoverflow.com/questions/12434863/executing-a-batch-script-on-windows-shutdown and https://superuser.com/questions/1352538/how-to-run-batch-script-on-logoff and https://www.nextofwindows.com/how-to-run-a-script-or-command-at-logoff-in-windows-7-8 Have you hard buttoned it ? This batch file at shutdown isn't this issue, I feel. Link to comment Share on other sites More sharing options...
nsan3 Posted May 12, 2020 Author Share Posted May 12, 2020 2 hours ago, Dodel said: Gpedit, as you run pro. https://docs.microsoft.com/en-us/previous-versions/technet-magazine/dd630947(v=msdn.10)?redirectedfrom=MSDN or https://stackoverflow.com/questions/12434863/executing-a-batch-script-on-windows-shutdown and https://superuser.com/questions/1352538/how-to-run-batch-script-on-logoff and https://www.nextofwindows.com/how-to-run-a-script-or-command-at-logoff-in-windows-7-8 Have you hard buttoned it ? This batch file at shutdown isn't this issue, I feel. Thanks @Dodel it worked Link to comment Share on other sites More sharing options...
Dodel Posted May 13, 2020 Share Posted May 13, 2020 Can you let us know what the outcome is after trying the fix, ty. Link to comment Share on other sites More sharing options...
nsan3 Posted May 13, 2020 Author Share Posted May 13, 2020 Well its actually a bit better now, my battery is not draining out as before Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.