Showing posts with label Windows 8. Show all posts
Showing posts with label Windows 8. Show all posts

Tuesday, August 14, 2018

Enable Disk Clean-up

It seems in Windows Server latest versions the good old disk clean up tool is not enabled by default. If you just want it back you can run the below commands in a command prompt to copy the required files.

Copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe C:\Windows\System32\

Copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui C:\Windows\System32\en-US\

Then create a shortcut pointing to the Disk Clean up tool found in the following path.

C:\Windows\System32\CleanMgr.exe

I did try this on Windows Server 2008 R2 and hope it works as it is or with slight changes on other versions of Windows as well.

Tuesday, June 20, 2017

Enabling .NET 3.x on Windows 8 and Up

As you may be knowing, now you do not need to separately download and install .Net framework as we used to do with the older .Net frameworks. Since it is coming with Windows, you can just go to “Turn Windows Features On or Off” screen and enable framework you are after. It is simple right?

But in one of the machines it was not that simple for me. The installation tried to download files from Windows Update and was failing mentioning that it cannot get connected to Windows Update when the machine is connected to the internet without any issues.

The solution is to use DISM (Deployment Image Servicing and Management) tool to get it installed.

First you need to find a Windows setup media, a setup DVD or an ISO downloaded will work.

Then use the below command to enable the feature using a local source. Remember to open the Command Window as an Administrator of the machine.

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:E:\Sources\sxs

/Online – Targets the currently active and running OS.

/LimitAccess – If some installation files are missing, this will check Windows Update for the missing files. For not to check use /LimitAccess:True.

/Source – Is the location to find the source files, E: is my virtual drive which I mounted the previously downloaded Windows ISO.

If typed correctly, there will be a progress bar showing the installation progress.

image

Sunday, March 26, 2017

Removing all Partitions from a Disk

Today I thought of writing an article on how to remove all the partitions from a disk so you can re-use the disk.

If you tried removing existing partitions using the Computer Management (type computer management on the start menu to open it) tool in Windows you will find that, you can delete partitions by right clicking on the partition / volume and clicking on Delete Volume option.

image

However you will notice Computer Management is useless on some of the protected volumes since the options to work on them will not be available.In this case you will need to use the DiskPart utility in the Command Prompt.

image

In the Start type Cmd or Command Prompt to open a command prompt. Then type DiskPart, it is a powerful utility which can even work on protected volumes.

In my case, I would like to work on Disk 3 to remove all the existing volumes on it. Below are the steps required to clean the drive.

1. Select the disk.

List all the disks by typing List Disk, this will list all the disks connected and active at the time in your computer including the disks connected via USB ports.

image

Once you identify the disk you need, selection can be made by using the command Select Disk x. In my case Select Disk 3.

To confirm, list all the partitions on the selected list by using the command List Partition.

image

2. Delete all partitions by using the Clean command.

Ensure the proper disk is selected by Listing all disks by command List Disk, the currently focused disk will have a star at the beginning since recovering disks is not easy.

Type Clean and press enter. This will remove all the partitions from the disk. You can check the results by re issuing the List Partition command.

image

Close the DiskPart tool by entering the command Exit.

Computer Management will now show that the disk is uninitialized as below, Initialize the disk and create partitions / volumes as necessary to use it again.

image

Removing a Partition from a Disk

You can remove simple partitions by using the Computer Management tool found in Windows. Search for it on the Start menu to launch it.

But if it is a protected partition you will need to use the tool DiskPart. In the Start menu type Cmd or Command Prompt to open a command prompt. Then type DiskPart, it is a powerful utility which can even work on protected volumes.

To delete one partition, follow the steps.

1. List all disks by using the command List Disk.

2. Select the disk by using Select Disk x command.

3. You can confirm the disk by listing all the partitions on it by using the command List Partition.

4. Select the partition by using the command, Select Partition x command.

5. Delete the partition by command Delete Partition Override.

Override parameter needs to be passed if the partition is not a simple data partition.

You can confirm the deletion by re-listing the partitions on the disk by List Partition command.

image_thumb[15]

Monday, December 26, 2016

Open Live Writer – Plugin Not Working

While trying to setup and use the Code Plugin by Rich Hewlett I had trouble getting the plugin loaded into Live Writer. I did add the registry entry required as mentioned in the site, but still the plugin did not load.

Registry

Location - HKEY_CURRENT_USER\SOFTWARE\OpenLiveWriter\PluginAssemblies

Key - SyntaxHighlight_WordPressCom_OLWPlugIn

Value - C:\Users\Arjuna\AppData\Local\OpenLiveWriter\Plugins\SyntaxHighlight_WordPressCom_OLWPlugIn.dll

After a while I figured out that, when loading the plugin Live Writer encounters the following error.

"System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Arjuna\AppData\Local\OpenLiveWriter\Plugins\SyntaxHighlight_WordPressCom_OLWPlugIn.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Arjuna\AppData\Local\OpenLiveWriter\Plugins\SyntaxHighlight_WordPressCom_OLWPlugIn.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

This is due to a security feature of .Net Framework 4 or later. Before framework 4, if a DLL is downloaded (which is created in another computer), they used to run in full trust in the zone the assembly is running, but with frameworks 4 and later, downloaded DLLs will not run by default. To make them run, simply grant the DLL full access by going to file properties and selecting the Unblock checkbox in the security section as seen in the below image. This will apply to any plugin you download from internet. Also keep in mind to do this to DLLs you trust safe. Otherwise your computer will be unsafe.

image

To troubleshoot plugin and other errors you can refer to Open Live Writer log file located in C:\Users\Arjuna\AppData\Local\OpenLiveWriter\Open Live Writer.log.

Monday, January 21, 2013

Enabling Hibernate in Windows 8

If you have start using Microsoft’s latest Personal Computer (PC) Operating System (OS) Windows 8, by now you may have found it is different in some ways to it’s predecessors. One feature I am heavily using in Windows was again missing after installing this version of Windows, which is the hibernation feature.

image

So if you like hibernation shown on your power menu try doing the following.

1. Move your mouse cursor to the right side of your screen to activate the quick access menu and click on Settings and then on Control Panel.

image

image

2. Then select “System and Security”.

image

3. Now select Power Options.

image

4. From the left hand navigation menu select “Choose what the power button does” or “Choose what closing the lid does”.

image

5. Now on system settings screen you need to click on “Change settings that are currently unavailable” to modify the disabled options.

image

6. Scroll down to Shutdown settings and check the box named Hibernate and click Save Changes button.

image

Now if you look at the options available in your power menu Hibernate will also be part of it.

image

If this does not bring hibernation back, please try the following as well.

1. From the power options screen select “Change plan settings” of the active plan.

image

2. Then select “Change advanced power settings”.

image

3. Now click on “Change settings that are currently unavailable”. This will list down all the features available in the system. Scroll down and expand Sleep –> Allow hybrid sleep and turn on hibernation as you want.

image

image

 

With these changes the “Hibernate” option should start appearing in your Power options menu.