Getting a drive detected in THIS PC

Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 - Aug 1, 2023 at 05:07 AM
 Sebastian42 - Aug 24, 2023 at 07:57 AM

In my x32Win10ProV22H2, I have SSDs that are connected via SATA ports, but whose power can be switched on (and off) as required. The BIOS has been set to ACHI, so all connected drives should be 'hot swapable'. Yet from time to time, newly connected (i.e. newly powered) drives, do not get detected unless I reboot the PC. I'm looking for a tweak that will force detection without rebooting. I put this question to another forum and one of the responses, provided a batch file to trigger 'rescanning'. The concept is EXACTLY what I am after, but alas the code does not achieve the desired result - it does launch the Command Prompt (probably at elevated level), and Diskpart is employed. I'm wondering if the batch file can be improved or some other work-around created, to avoid the need to reboot so as to get a drive detected.


Windows / Firefox 115.0

Related:

10 responses

HelpiOS Posts 13878 Registration date Friday October 30, 2015 Status Moderator Last seen September 23, 2023 1,889
Aug 1, 2023 at 08:17 AM

Hi,

Your SSD should be automatically recognized whiteout necessarily rebooting Windows. I suggest you try reinstalling your USB controllers to fix the issue.

Press Windows + R, type devmgmt.msc and press Enter. In Device Manager, expand Universal Serial BUS controllers. Right-click Generic USB Hub and choose Uninstall. Repeat the same thing for the other USB controllers.

Once done, restart your computer. It will reinstall all the USB controllers after restart.


0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Updated on Aug 1, 2023 at 08:26 AM

The PC misbehaves in the way I have described SOMETIMES, so I only need a remedy occasionally. Your suggestion implies a permanent change to the PC - that is NOT warranted - in any case USB is not involved, the SSDs are connected through SATA ports.

Your remedy of rebooting is the very thing I'm trying to avoid.

I already know that without Win-R, a reboot will restore recognition.

0
HelpiOS Posts 13878 Registration date Friday October 30, 2015 Status Moderator Last seen September 23, 2023 1,889
Aug 1, 2023 at 01:29 PM

Rebooting in the steps I suggested is only necessary to allow the computer to reinstall the drivers - it's not a method to apply more than once. If the drivers are corrupted, reinstalling them can repair them and often fix the issue permanently.

Now, as you connect your SSD through SATA and not USB, make sure your SATA cable isn't faulty and is correctly connected to the SATA port. You may try another SATA port to see if the issue occurs again.

Go to Device Manager, expand IDE ATA/ATAPI controllers, right-click on your SATA controller and choose Update driver. Like the previous steps with USB, updating the driver may fix the connection issue that occurs occasionally.

Try changing the power settings of your computer. Search for "power options" from the search box in the taskbar. Select Change plan settings next to your selected plan, then choose Change advanced power settings.

Click Change settings that are currently not available. Expand Hard disk and set both options of Turn off hard disk after to Never. This will stop Windows from turning off your hard drives after idle, which may prevent them from being detected again.

Can you also share the batch file you got so we can take a look?


0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Aug 1, 2023 at 06:04 PM

The batch file goes :

DISKPART /s C:\script.txt

where script.txt specifies : rescan

That gave me the idea me that a potential technique is to see if Disk Management could be used - sure enough, its Action Menu has 'rescan Disks'. I suspect that is what the batch file activates. In my opinion, that is the ideal was to solve this intermittent problem - if only it achieved the desired result, but it hasn't..

On the one occasion where I needed to detect a disk, and the batch failed, the problem was solved by reseating the leads into the SSD.I was already aware of that mechanical weakness. The other instances which are not due to a poor connection because a reboot fixes the problem, have not happened since the Disk Management option occurred to me.

0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Aug 2, 2023 at 08:19 AM

Attempt to update SATA drivers triggered :"The best drivers for your device are already installed." and Windows Update says that Windows is already uptodate, so it's no source of later drivers. In any case the driver is fine most of the time; just occasionally a drive is not detected.

The Power options in my PC are not as you list them so i can not follow them.

0

Didn't find the answer you are looking for?

Ask a question
HelpiOS Posts 13878 Registration date Friday October 30, 2015 Status Moderator Last seen September 23, 2023 1,889
Aug 2, 2023 at 05:23 PM

Just to be sure, the file "script.txt" is saved on C:\ along with the "Users", "Program Files", "Windows"... folders?

You can try testing the script manually by opening cmd as admin. Type the following commands and press Enter after each of them:

  • diskpart
  • rescan

Does that work to force the detection of your SSD? If yes, try launching the batch file with admin rights and see if it works now.

Otherwise, here are other methods I suggest to try:

Open Device Manager, select the icon of your computer, then click Action > Scan for hardware changes.

Try logging out and in to see if that allows to detect your SSD without rebooting your computer.

For the Power Settings, open Control Panel > Hardware and Sound > Power Options. Alternatively, press Windows + R and type powercfg.cpl. Next to the selected plan, click Change plan settings and follow my previous instructions.


0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Aug 18, 2023 at 01:27 AM

The opportunity to test your suggestions had finally arrived.

Rescan failed;

Device Manager failed;

I could not find a log-off option.

Not yet tried power options, but am skeptical as that is a 'permanent' adjustment, whereas the problem is

occasional; 

Restart solved it (as said in my first post).

NO progress yet.

0
HelpiOS Posts 13878 Registration date Friday October 30, 2015 Status Moderator Last seen September 23, 2023 1,889
Aug 18, 2023 at 11:14 AM

Thank you for updating us about the situation.

To log out of Windows, open the Start menu and click the profile picture (or icon) of your user account, then select Sign out.

Regarding the power options, the change is permanent indeed, but it can be reverted to its default values anytime, and in case it doesn't help with the issue. When you click Change plan settings > Change advanced power settings, select the Restore plan defaults button.

As no solution has been found yet, I suggest you test with the power options first and if that doesn't work either, try creating a new user account and see if the issue occurs with it. This will help to find out if there's a problem with your current user account.

Good luck


0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Aug 19, 2023 at 09:31 AM

Thank you for the user-account suggestion - however, that is not practicable, unless you mean, set up a second account and when the problem occurs, switch accounts to see if it happens there as well. IS THAT what you mean ?

0
HelpiOS Posts 13878 Registration date Friday October 30, 2015 Status Moderator Last seen September 23, 2023 1,889
Aug 20, 2023 at 03:47 PM

When you turn on your computer - or before you turn it off, log in to that new account, connect your SSD and see if it is recognized. Repeat this several times with the new account, until failure is likely to happen. After the test, you can switch to your main account and use your computer as usual.

Of course, if you encounter the issue with your current user account, you can switch to that new account and see if that helps to force detection of your SSD. If not, log out of your current account (from the Start menu) then log back in - or try switching to the new account once you log out.

0
Sebastian42 Posts 58 Registration date Tuesday March 30, 2010 Status Member Last seen August 20, 2023 3
Updated on Aug 20, 2023 at 11:32 PM

'until failure is likely to happen.=' That is not practicable. It can take weeks before the failure re-occurs.

If failure happens in my usual account, I can try to see it if shows in my other account, but I sense that that is NOT what you had in mind when you suggesting trying another account, but you can see some merit in it.

0

HelpiOS - Non-detection happened again, and I logged out, and into a different account. The drive still did not show; but did after a reboot.

Now I have to wait till another failure to try the power option.

0