''COM4 already in use. Try quiting other program may be using it''

Hello Everyone

When I upload the program, it took long first then it says ''COM4 already in use try quiting other program may be using it''. I checked in Device manager it says under Ports (COM & LPT) that COM4 is assigned to Arduino Mega 2560 (COM4). I reconfirmed it by checking in Arduino IDE in Tools menu which says ''Serial Port -> COM4''. Thats very annoying. If somebody know the solution kindly let me know. Thanks for reading my problem.

Regards Hassan

Don't know, but a "Standard Windows Corrective Manoeuvre" may help.

Worth a try is:

In Windows, navigate: Start -> Right-click on 'Computer' -> Select 'Properties'. Then select Device manager.

Right-click on 'Universal Serial Bus Controllers' and select 'Scan for hardware changes'

Right-click on 'USB Virtualization' and select 'Scan for hardware changes'

Still in Device Manager, expand 'Mice and other pointing devices' and check for Microsoft Serial Ballpoint. Sometimes Windows installs a driver for that when you plug in an unrecognized device and causes all sorts of problems.