Simple VBS script (save it as .vbs file and run) to get once the laptop battery is charged up to given (90 in this case) percentage.
set oLocator = CreateObject("WbemScripting.SWbemLocator")
set oServices = oLocator.ConnectServer(".","root\wmi")
set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
for each oResult in oResults
iFull = oResult.FullChargedCapacity
set oResults = oServices.ExecQuery("select * from batterystatus")
for each oResult in oResults
iRemaining = oResult.RemainingCapacity
bCharging = oResult.Charging
iPercent = ((iRemaining / iFull) * 100) mod 100
if bCharging and (iPercent > 90) Then msgbox "Battery is at " & iPercent & "%",vbInformation, "Battery monitor"
wscript.sleep 30000 ' 5 minutes
If due to any reason you lost your boot system, you can restore window’s bootloader using windows CD or bootable pendrive. You may need this to do if you had linux grub earlier which you uninstalled now, or due to damage to bootloader.
Follow these steps to restore MBR (Master Boot Loader) for Windows Bootloader
- First of all insert Windows CD / bootable pendrive in your computer and start it. (follow my another post if you need to know how to make your pendrive bootable manually)
- Now go to Command line at boot time
- In windows 7, select ‘Repair your computer’ >’Startup Recovery Option’ > ‘Command Line’
- In windows 8, select ‘Repair your computer’ > ‘Troubleshoot’ > ‘Advance Options’ > ‘Command Line’
- Now give following commands
Virtual Network Computing (VNC) is a graphical desktop sharing system. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.
If you want to try VNC:-
- Download it from http://www.realvnc.com/download/binary/1266 (.tar.gz for linux) or http://www.realvnc.com/download/binary/1276 (.exe for windows)
- Install vncserver on your server and get a display using command ‘vncserver’
- This command will give you a DisplayNumber; keep it safe.
- Now using start VNCviewer on any other computer and give your.server.name.com:# as VNC Server where # is your DisplayNumber.
First I installed VNC Server on our spider server (spider.nitt.edu)
Then I started a VNC Display by giving command ‘vncserver’. And I got “New ‘spider.nitt.edu:13 (ram)’ desktop is spider.nitt.edu:13”. It means that a new desktop sharing has been started by user ‘ram’ with display number 13.
Now from any computer I can start VNCViewer, and by giving spider.nitt.edu:13 as VNC Server, I can get the graphical display from the server.
- At any time I can have any number of display’s of same server form same account.
- To start new desktop display, as i said earlier, simply give command ‘vncserver’ on the server, you will get new display number.
- To stop any display form server, you can give command ‘vncserver -kill :#’ where # can be replaced with the display number you want to stop.
Another post of mine describes why we need to enable .NET framework 3.5 manually on windows 8, and all methods to enable it. Now I will tell you what if you are unable to enable it. I am going to take only very specific case, may not be applicable everywhere.
I tried to enable it using DISM command (I had my windows8 ISO image mounted on I: drive)
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:I:\sources\sxs
But it didn’t work, In such case I tried a lot of other options but could not find any solution. Finally I tried removing /All and /LimitAccess in above command and I worked 🙂 So you can also try just the following command
DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:I:\sources\sxs
The .NET Framework 4.5 is included with Windows 8 and installed on your computer with the Windows 8 operating system. But the .NET Framework 3.5 is not automatically installed with Windows 8. So whenever you will try to install any software / app on you computer which uses this framework will ask to first install such .NET framework 3.5.
So to run apps that require the .NET Framework 3.5 on Windows 8, you must enable version 3.5 on your computer. There are two ways you can do this: by installing or running an app that requires the .NET Framework 3.5 (that is, by installing the .NET Framework 3.5 on demand), or by enabling the .NET Framework 3.5 in Control Panel. Both options require an Internet connection. You can use DISM (Deployment Image Servicing and Management) to enable it directly from ISO image file or DVD.
Now either your software(which requires .NET framework ) setup will automatically install the framework on Demand using internet, or you can manually install it from control panel. In Control Panel, choose Programs and Features, choose Turn Windows features on or off, and then select the .NET Framework 3.5 (includes .NET 2.0 and 3.0) check box. This option requires an Internet connection. You do not need to select the child items for Windows Communication Foundation (WCF) HTTP activation unless you are a developer who requires WCF script and handler mapping functionality.
If you cannot connect to the Internet, you can enable the .NET Framework 3.5 by using the Deployment Image Servicing and Management (DISM) command-line tool and specifying the installation media (ISO image or DVD) you installed Windows 8 from.
- In Windows 8 or Windows Server 2012, open a Command Prompt window with administrative credentials (that is, choose Run as administrator).
- To install the .NET Framework 3.5 from installation media located in the D:\sources\sxs directory, use the following command:DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxswhere:
- /Online targets the operating system you’re running (instead of an offline Windows image).
- /Enable-Feature /FeatureName:NetFx3 specifies that you want to enable the .NET Framework 3.5.
- /All enables all parent features of the .NET Framework 3.5.
- /LimitAccess prevents DISM from contacting Windows Update.
- /Source specifies the location of the files needed to restore the feature (in this example, the D:\sources\sxs directory).
For more information about DISM parameters and options, see How to Enable or Disable Windows Features
IF THIS DOESN’T WORK THEN YOU CAN REMOVE /All and /LimitAccess from above command, it may work fine 🙂