Showing posts with label Windows Vista. Show all posts
Showing posts with label Windows Vista. 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.

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.

Friday, January 25, 2013

Lock Windows

If you wanted to lock your Windows using a batch file it can be achieved using the following command.

rundll32.exe user32.dll, LockWorkStation

This will be handy if you need to lock your computer after a certain scheduled action. Simply place this in a bat file, and schedule the bat file to be run to get the computer locked.

I tried this on Windows 7.

Wednesday, August 01, 2012

HTTP Error 500.19 – Internal Server Error

Recently in one of my machines I got the above HTTP error when running an application hosted on IIS 7. The detailed error was as below.

IIS Error

“This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".”

After doing some troubleshooting I was managed to get this error fixed by reinstalling ASP.Net by running the aspnet_regiis –ir command.

For more information on running the command please refer to my old article Unable to start debugging on the web server.

Sunday, July 08, 2012

Enabling Windows Aero

Recently suddenly my computer lost Windows Aero effects. After trying out many things I found that it is due to the Log Me In mirror driver.

It seems Log Me In mirror driver is not compatible with Windows Aero effects so if you also lost Windows Aero and you have Log Me In installed on your machine to activate Aero back first try disabling “LogMeIn Mirror Driver” and restart your machine.

This can be done by going to Device Manager by clicking,

Start –> Control Panel –> Administrative Tools.

Then double click on Computer Management. Now in the Computer Management window click on the Device Manager.

Another way to reach the Device Manager is by pressing the Windows key and the Pause key in your keyboard simultaneously.

Now expand the Display Adapters and right click on LogMeIn Mirror Driver and click on Disable.

Device Manager

This will disable the Log Me In mirror driver enabling Windows Aero after you restart your machine.

If you cannot see Aero effects after the restart search for the word Aero in your start menu and click on the Aero troubleshooter and follow the wizard to get Aero effects back.

Aero

Saturday, June 05, 2010

Enabling Hibernate in Windows

Some server versions of Windows are having the hibernate feature disabled by default. So if you need to change the hibernation do the following simple steps.

1. Click start and type “cmd” or type command in the search box.

2. Then in the search results, right click the Command Prompt and click on Run as Administrator.

3. If you are prompted by the user account control click continue.

4. Then,

To turn hibernation on in your machine type -

powercfg.exe /h on” or “powercfg.exe /hibernate on

To turn hibernation off in your machine type -

powercfg.exe /h off” or “powercfg.exe /hibernate off

5. Lastly you can exit the command prompt by typing “exit”.

 

Sometimes you might get an error similar to the following while trying to enable hibernation.

Hibernation failed with the following error: The request is not supported.

The following items are preventing hibernation on this system.
        An internal system component has disabled hibernation.

 

This means your machine is running roles or services that are disabling hibernation feature. One such a role is Hyper-V. If your version of Windows 2008 is running Hyper-V then you cannot enable hibernation. This is not an error but is deliberately done since hibernating a server running virtual machines is a very complicated and rarely requiring service in an enterprise server.

But there is a way to enable hibernation on a Hyper-V installed machine, which you will be able to find in my next article.

Saturday, May 29, 2010

How to Make a Bootable Flash Drive

Recently I installed Windows using a flash (Pen/Thumb) drive, since I couldn’t get hold of a blank DVD to burn the ISO into.

It might be helpful to you as well. Because we don’t need to burn DVDs to install OSs that are coming as ISOs anymore.

Follow the steps below.

1. Find a good USB Flash drive with required space.

Make sure you have backed up all the required data in the flash drive because the flash drive will be formatted.

2. Get a command prompt by typing “cmd” in the run window.

3. Type “diskpart” and press enter.

This will open up a new window for DiskPart utility, you need to use the following commands within the diskpart utility to make the flash drive bootable.

4. In the diskpart utility select the flash drive by typing “select disk 2”.

Use extra caution when selecting the flash disk since if you select the wrong disk you will loose all data of that disk. You can use “list disk” command within the diskpart utility to list all the disks attached to your computer. Note the disk referred here is a physical disk attached to the computer not a partition.

5. Clean the disk by using the command “clean”.

6. Create a primary partition inside the flash drive by typing in “create partition primary”.

7. Select the newly created partition by using command "select partition 1”.

8. Make the selected partition active by typing in the command “active”.

9. Then you need to format the partition by using the command “format fs=fat32” inside the diskpart.

Note that we are formatting the disk using FAT32 file system.

10. Use the command “assign” to assign a drive letter for the newly formatted drive, since we are not giving a drive letter it will get the next available drive letter automatically. Then exit the diskpart utility by typing in “exit”.

11. Now we need to copy the setup files to the flash drive.

For this we can use the good old xcopy command as of below.

xcopy F:\*.* /s/e/f G:\

In the above command I am coping the contents of the drive F (which is a virtual drive created by Power ISO) to drive G which is the flash drive I created.

The meanings of the flags I used are as follows.

“xcopy F:\*.* /s/e/f G:\”

F:\ – Source Drive

*.* – All Contents

/s – Copies directories and sub directories which are not empty

/e – This will add the empty directories also so now all the directories and sub directories will be copied even though they are empty

/f  – Will show the source and destination file names while copying.

G:\ – Destination Drive

When xcopy completes you will have a flash drive which you can boot your computer, in my case I had a Windows 2008 R2 installer. You may even be able to copy the OS files to your flash drive and boot an OS with this method.

Then you may need to change your BIOS options and/or press function keys to let you boot from the flash drive.

Sunday, April 18, 2010

Windows Update Error

Today I faced an error when trying to install few updates for Windows. The message Windows was showing was “Windows update encountered an unknown error.”. So it was not helpful in resolving the issue.

This is happening due to either update not getting downloaded properly, getting corrupt while downloading, space issues in your hard disk, errors while applying updates, etc.

To my satisfaction one thing I did, fixed the issue. If you are also getting similar error I recommend you to first browse to your SoftwareDistribution folder inside Windows installation folder. For example I found it in “C:\Windows\SoftwareDistribution”.

Then delete all the folders in the folder (make sure the Windows Update is closed before doing this) and restart your computer.

After making sure your Windows installation partition is having enough free space (about 1 GB) try running Windows Update again. This time the updates will get installed successfully.

Wednesday, May 20, 2009

Temporary Internet Files Location

Did you ever tried to locate the place where the temporary files of the Internet Explorer is stored?
Knowing the location is really worth if you edited a file while keeping it in the temporary folder and accidentally close the file without saving it into a proper place.
Exact same thing happen to me, even though I knew the place where it would go in a Windows version prior to Windows Vista, but surprisingly it was different in Windows Vista.
So had to struggle a bit to find it, and I was too late to recover the changes that I did to the document. But since it is here, you are not too late.
C:\Users\ArjunaC \AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5
The trick here is the folder named 'Low' is completely hidden by Vista, even you enable, show hidden and system files and folders the folder 'Low' will not appear. But you will be able to type it and browse the contents of the folder.

Monday, September 10, 2007

Windows Vista Service Pack 1

Microsoft is going to release Service Pack 1 (SP1) for Windows Vista. It will have the updates that Microsoft had released up to now and also some reliability and performance improvements addressing the issues they have found.

The beta version is planned to be available in few weeks time from today (2007-September-09).

Thursday, August 02, 2007

Dual Booting Windows Vista

As I normally need several Operating Systems installed in my machine, after installing Vista also I tried the same. This made me to find, that the Vista boot loader is different to the earlier OS boot loaders. Because of this difference if you install earlier version of OS after installing Vista, you will not be able to start Vista.
These are the things which I found out.
If you need to multi boot Vista, then first install the oldest OS first. If the OSes are Windows XP, Windows 2003 and Windows Vista then install Windows XP first then Windows 2003 and finally Windows Vista.
Also note that if you install any earlier version after installing Vista you will have to fix the Vista boot loader. This can be done by booting the computer using the Vista installation CD and trying a start up recovery.
A good article is located at http://www.itnews.com.au/News/NewsStory.aspx?story=55148.

Tuesday, July 10, 2007

Installing Office 2007 Ultimate on Windows Vista Ultimate

As it always happens, last few days I was busy with a curious error while trying to install Office 2007 Ultimate edition on my newly installed Windows Vista.

The errors I got were.


I have seen many posts on the internet but many were regarding upgrading to the released version from beta. But my case was different because it was a fresh copy of Vista and it was a DVD received from Microsoft.
After some struggle I got Office installed and would like to share how I succeeded. What I suspect was that it was having a problem copying files from source to destination at a stretch. The way I did was like this.

The first advice I give is, If you are installing office to some other directory than default given directory, please create that exact directory in your hard disk and point the setup to that directory.
Then try normal installation of Office 2007. If you are in my category it will fail after giving one of the above errors. Let it fail by pressing Abort button because we have no other option.

Again start the installation, this time select the top node, right click and select "Install on first use" (This will make all the software's install at the first attempt made to use them.) and continue with the setup.
In our earlier setup, it failed saying that one of the cabinet file was corrupt so cannot continue with the setup. This time because we used the option install on first use this error will not appear.

After successfully completing the setup. Try running Word for the first time. This will start the setup process. Sometimes you may be required to insert or point to the installation source during setup. If the same above mentioned error comes click Abort. Even you click Abort Word will start. Then after closing Word do the same on PowerPoint and let PowerPoint also start.

Now you have Word and PowerPoint up and running. Close all opened software's and insert you Office installation source and start the installation again. This time select "Run from Computer" option (or what ever options you want to select). Then start the installation. When Office setup starts the progress bar remove your installation source (CD, DVD,...). Because the new installer will keep the required files for the setup, it will run normally for sometime. If any files for the selected options are missing then installer will ask at that place to point to the source.

After sometime the setup will request for the files which are missing (My case it asked for ExcelLR.cab). This time it will allow you to browse for the file. Be careful this will allow you only once to browse, if you select the wrong location then it will give setup fail message and you have to restart setup after pressing Abort. When browsing for the file remember to just point to the folder above the actual file not to the actual file it is requesting. (In my case I directed to the folder CD:\English\OfficeSystem2007\ULTIMATE2007\Excel.en-us.)

If you properly followed everything setup will now continue without errors.
If you are still having problems then I recommend you to find another edition of Office 2007 (Enterprise, Professional) and try installing Excel with that edition. After successfully completing that setup run the Ultimate setup again. Then when the progress bar starts remove the installation source. You may have to browse for the installation source after sometimes. After you installed ultimate edition successfully remove the other edition using add remove programs. And perform a repair operation on the ultimate setup. This will fix any edition clashes and will configure ultimate edition properly.