How do I delete a folder that’s in use?

[Origin]: https://superuser.com/questions/2937/how-do-i-delete-a-folder-thats-in-use

Sometimes when I’m working in Windows I’ll get this prompt when I try to delete a directory:

Folder In Use
The action can't be completed because the folder is open in another program
Close the folder and try again.

However, the folder isn’t “in use” at all, and I don’t have it open. So how can I delete it short of rebooting?

shareimprove this question

There’s a native GUI for Windows:

Start>>All Programs>>Accessories>>System Tools>>Resource Monitor (or Run resmon.exe)

You can search for the “Associated Handles” using the searchbox (circled in red), and right click the process you want to end.


As an example, in the image below I could not delete my Eclipse directory. Searching for the Eclipse associated handles showed that the adb.exe had a handle to the directory. After ending the adb process, I could then delete the Eclipse directory.

enter image description here

shareimprove this answer

[Bash on Windows] Getting dbus and X server working

[Origin]: https://www.reddit.com/r/Windows10/comments/4rsmzp/bash_on_windows_getting_dbus_and_x_server_working/

submitted 1 year ago * by ShaRose

So, most people who are using bash subsystem in the windows 10 insider builds seem to be aware that it’s possible to use X servers for windows such as vcxsrv or Xming, but most applications require the dbus service, which doesn’t work. This results in applications like Firefox or virt-manager (when ran in the linux subsystem) to crash either on launch or after a short time, and so it’s seen as fairly buggy.

However, the main application I wanted to run for this was virt-manager, because I wanted to be able to administrate qemu servers on windows without having to use a VM to run that. virt-manager needs a dbus server to even launch, so I started trying to get it running: And I succeeded. And surprisingly, it was fairly easy.

All that needed to be done (From a clean install of windows 10 with Bash installed, of course) was do three steps:

1) install an X server. vcxsrv and Xming are confirmed to both work just fine.

2) add DISPLAY=:0.0 to your bashrc: you can do this by executing the following command

echo "export DISPLAY=:0.0" >> ~/.bashrc

Now X programs will show the window correctly.

3) Now we need to fix dbus: The issue with this was that by default, dbus uses unix sockets to communication, which windows bash at the moment doesn’t support. So we just need to tell it to use tcp. In /etc/dbus-1/session.conf, you need to replace <listen>unix:tmpdir=/tmp</listen> with <listen>tcp:host=localhost,port=0</listen> and then you are done. Note this file needs root to edit. An easy way to do this is to execute the following:

sudo sed -i ‘s$&lt;listen&gt;.*&lt;/listen&gt;$&lt;listen&gt;tcp:host=localhost,port=0&lt;/listen&gt;$’ /etc/dbus-1/session.conf

And now close bash, and open it again. Feel free now to run whatever: Firefox and virt-manager work. Chrome sadly doesn’t for another reason of note.

Hope that helps someone.

How to enable NumLock on the Logon screen and Lock screen in Windows 10

[Origin] http://winaero.com/blog/enable-numlock-logon-screen-windows-10/

How to enable NumLock on the Logon screen and Lock screen in Windows 10

If your Windows account password or user name includes numerals, you might need to frequently use the numeric keypad to enter them. For that you need to enable NumLock, which may not on by default on your Logon screen/Lock screen in Windows 10. In this article, we will see how to enable Num Lock by default. This trick will also work in Windows 8.1, Windows 8 and Windows 7.

Enable NumLock by default in Windows 10, Windows 8, Windows 8.1 and Windows 7

This does not require any Registry hacks or changes to system settings.
Simply boot to the login screen or the Lock screen and do the following:

  1. On the Logon/Lock screen, press the NumLock key on the keyboard to turn it on.
  2. The Login screen contains a power button in the bottom right corner. Use it to reboot Windows:Windows 10 reboot from login screen

The next time Windows boots, NumLock will be automatically enabled. If this trick does not work for you for some reason, try the Registry tweak below. It should work in all modern Windows versions including Windows 10 and Windows 8.x.

Enable NumLock by default using Registry tweak

Here we go.

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_USERS\.DEFAULT\Control Panel\Keyboard

    Tip: You can access any desired Registry key with one click.
    If you do not have this Registry key, then just create it.

  3. Find the string value called “InitialKeyboardIndicators”. In Windows 7, set its value data to 2. In Windows 8 and above, set its value to 80000002. A note for Windows 10 users: if your Windows 10 does not save the state of NumLock after the reboot, try to set the value “InitialKeyboardIndicators” to 2147483650. This will turn on NumLock on the logon screen starting from the next boot.enable numlock Windows 10

Bonus tip:Using the InitialKeyboardIndicators parameter, it is possible to control other keys besides NumLock. See the table for its possible values for Windows 7:

InitialKeyboardIndicators value Purpose
0 Turn all indicators off (NumLock, CapsLock, ScrollLock)
1 Turn CapsLock on
2 Turn NumLock on
3 Turn CapsLock and NumLock on
4 Turn ScrollLock on
5 Turn CapsLock and ScrollLock on
6 Turn NumLock and ScrollLock on
7 Turn all indicators on (NumLock, CapsLock, ScrollLock)

For Windows 8 and above you should try to use values like 80000000,80000001,80000002, i.e. add 80000000 to Windows 7 value.

You can save your time and use Winaero Tweaker instead. It comes with the following feature:

Winaero Tweaker Enable Numlock

You can download it here: Download Winaero Tweaker.
That’s it.

 

How to determine if a port is open on a Windows server?

[Origin]: http://stackoverflow.com/questions/273159/how-to-determine-if-a-port-is-open-on-a-windows-server

Assuming that it’s a TCP (rather than UDP) port that you’re trying to use:

  1. On the server itself, use netstat -an to check to see which ports are listening
  2. From outside, just telnet host port (or telnet host:port on Unix systems) to see if the connection is refused, accepted, or timeouts

On that latter test, then in general:

  • connection refused means that nothing is running on that port
  • accepted means that something is running on that port
  • timeout means that a firewall is blocking access
shareedit

I need to flush dns again and again to make the sites load

[Originally Posted From] : I need to flush dns again and again to make the sites load

UPDATE JUNE 4, 2015:-

My ISP provides a Wi-Max (wireless) device which receives the signals and sends it through LAN cable to my laptop. I’ve been using this device since last 5 years. Today, for a certain reason, my ISP’s custom care center replaced the device with a new device. Now, I’m no more facing this issue. So, I think that the problem is in the modem, not in Windows 8.1. I hope that my update will help others.


I’m facing a problem where when I visit a site Google Chrome says to me:-

“This web page is not available”

This happens for many sites. I’ve searched on Google and have found a fix. If I run the following command of flushing dns caching

ipconfig /flushdns

then I can load the site. But after few seconds or minutes Google Chrome again gives the same (error?) message. “This web page is not available”. I need to run the command again and again and it has now become very irritating. Anyone knows the solution of my problem?

OS: Windows 8.1 Browser: Google Chrome (Version 34.0.1847.131 m)

shareimprove this question

 

Removing Invalid Entries in the Add/Remove Programs Tool

[Originally Posted From]: https://support.microsoft.com/en-us/kb/310750

To remove a program reference viewable in the Add/Remove Programs tool:

  1. Start Registry Editor (Regedit.exe).
  2. Locate the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  3. Locate the key to be deleted by locating the key name created by the program. If the name of the key is not apparent, browse through each key and note the value for DisplayName. This is the viewable string in the Add/Remove Programs tool.
  4. Using the Registry menu, export the selected registry key to make a backup. Store the .reg file in a safe location in case you need to import it at a later date.
  5. Delete the selected registry key and its values. Do not delete the entire Uninstall key.
  6. Quit Registry Editor.
  7. Verify that the reference in the Add/Remove Programs tool is no longer visible.

How to Completely Uninstall / Remove a Software Program in Windows without using 3rd Party Software?

[Originally Posted From]: http://www.askvg.com/how-to-completely-uninstall-remove-a-software-program-in-windows-without-using-3rd-party-software/

How to Completely Uninstall / Remove a Software Program in Windows without using 3rd Party Software?

Generally all computer users install various software programs regularly. Sometimes they keep them and sometimes they decide to remove them.

To remove a program in Windows, we uninstall it from Control Panel but many times the default uninstallation utility provided by the program doesn’t remove the program completely. It lefts some entries in Windows Registry, some files in various folders in your hard disk drives.

These leftovers might slow down your system and there is no point to keep them in your system.

There are many 3rd party software like Revo uninstaller, etc are available on Internet which claim to completely uninstall a software program in Windows but sometimes these software also fail to completely uninstall a software from your system.

We here at AskVG always try to do the things ourselves so today in this tutorial, we are going to share some easy to use steps which will help you in completely uninstall a software program in Windows.

So without wasting time lets start the tutorial. We have taken Mozilla Firefox as an example in this tutorial:

We have divided this tutorial in 4 steps:

  • Uninstall Using Control Panel
  • Delete Remaining Files and Folders of the Program
  • Remove Software Keys from Windows Registry
  • Empty Temp Folder

STEP 1: Uninstall Software Using Control Panel

First thing first! Uninstall the software using Windows Control Panel.

Windows XP and earlier:

Open Control Panel, double-click on “Add/Remove Programs“, select the program name and click on Uninstall button. It’ll remove it.

Windows Vista and later:

Open Control Panel, click on “Programs and Features“, select the program name and click on Uninstall button.

Uninstall_Software_Using_Control_Panel.png

STEP 2: Delete Remaining Files and Folders of the Program

Even though you have uninstalled the software using Control Panel, some files of this program might still remain in a few system folders.

To delete these leftovers, you’ll need check following folders:

%programfiles%
%appdata%

If you find any folder with the name of the software program which you uninstalled using 1st step, delete it.

NOTE: You just need to type the above mentioned text in RUN or Start Menu search box and press Enter. It’ll open the folders directly.

Program Files folder:

Delete_Software_Folder_from_Program_Files.png

Application Data folder:

Delete_Software_Folder_from_Application_Data.png

NOTE 2: 64-bit system users will also need to check “C:\Program Files (x86)” folder. Here we assume your Windows is installed in C: drive. If you installed Windows in any other drive, replace C: with that drive letter.

STEP 3: Remove Software Keys from Windows Registry

You’ll have to be very careful while following this step. Follow this step only if you are comfortable with Windows Registry and if you have used Registry Editor in past.

When you uninstall a software program, many times its entry in Windows Registry is not deleted by the uninstaller. It might increase Windows Registry size.

To completely uninstall the software, you’ll also need to delete its key from Windows Registry.

1. Type regedit in RUN or Start Menu search box and press Enter. It’ll open Registry Editor.

2. Now go to following keys one by one:

HKEY_CURRENT_USER\Software
HKEY_LOCAL_MACHINE\SOFTWARE
HKEY_USERS\.DEFAULT\Software

64-bit system users will also need to check following extra key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node

Once you go to the above mentioned keys, look for a key with the name of your uninstalled software. If you find a key, delete it.

If you get an error while deleting a Registry key such as “Cannot delete key: Error while deleting key“, you’ll need to take ownership of the key as mentioned in following tutorial:

[Guide] How to Take Ownership (Permission) of a Registry Key in Windows?

Sometimes the key name might be based on the company name or developer name so if you suspect a key, expand it and check whether its related to the uninstalled software program. If yes, you can delete it.

Delete_Software_Key_from_Windows_Registry.png

PS: Make sure to take a backup before deleting anything from Windows Registry so that you can restore it later if something goes wrong. To take backup, right-click on the key which you are going to delete and select “Export“. It’ll save a .REG file containing the backup of that key.

PS2: Expert users can also find all occurrence of the key with the name of uninstalled software using “Ctrl+F” and delete them. You’ll have to be very cautious for it. Delete the key only if you are absolutely sure that the key was created by the uninstalled software.

STEP 4: Empty Temp Folder

At last you can also empty Temp folder which contains temporary files and cleaning this folder is absolutely safe.

To empty Temp folder, type following one by one in RUN or Start Menu search box and press Enter:

%temp%
temp

It’ll open Temp folders. You can empty them. If Windows shows errors while deleting a few files, leave them. These files might be used by some running software or Windows services.

Empty_Temp_Folder.png

That’s it. After following the above mentioned steps, you’ll be able to completely uninstall and remove a software program from Windows.