Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

Getting a drive detected in THIS PC


  • Please log in to reply
10 replies to this topic

#1 Bastie

Bastie

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 31 July 2023 - 02:27 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 think. 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.



BC AdBot (Login to Remove)

 


#2 Chris Cosgrove

Chris Cosgrove

  •  Avatar image
  • Global Moderator
  • 26,932 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:04:57 AM

Posted 31 July 2023 - 04:27 AM

Not my field but I think you need to publish the code of this batch file to get any effective assistance.

 

Chris Cosgrove



#3 cryptodan

cryptodan

    Bleepin Madman


  •  Avatar image
  • Members
  • 33,826 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:04:57 AM

Posted 31 July 2023 - 04:43 AM

Some drives may not support hot swap capabilities.

US Navy Veteran from 2002 to 2006

Masters in Computer and Digital Forensics Expert - Stevenson University Alumni 2015

Arch Desktop - https://termbin.com/epij

Arch Laptop - https://www.termbin.com/dnwk

Ubuntu Server - https://termbin.com/zvra


#4 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 31 July 2023 - 06:47 PM

Chris Cosgrove - I will do as you suggest; I was not really expecting an improvement in the code, but instead to intimate the kind of solution I'm hoping for.  

 

@echo off
DISKPART /s C:\script.txt

 

where script.txt says

 

rescan

 

Bleepibn madman - 'Some drives...' This malfunction only occurs sometimes, so the capability is there most of the time.

.



#5 garlin

garlin

  •  Avatar image
  • Members
  • 99 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 02 August 2023 - 10:06 PM

Have you tried "pnputil /scan-devices"?



#6 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 23 September 2023 - 08:36 AM

Garlin - I have not tried "pnputil /scan-devices" because I did not see your post till today (23/9/23), and I do not know about that option. It looks to me like something one could run from an elevated DOS prompt. I will try that next time a drive that should be detected, is not. Thank you.



#7 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 26 September 2023 - 07:29 AM

The malfunction occurred tonight, so I ran what you advised in an elevated Command Prompt. Nothing  changed in 'This PC' or in Disk Management.

The Image tool in this thread asks for a URL, so  I can not show you a screenshot of the Command Prompt Page.

As stated in my first post, a reboot (which I want to avoid) fixed it.


Edited by Bastie, 26 September 2023 - 07:47 AM.


#8 cryptodan

cryptodan

    Bleepin Madman


  •  Avatar image
  • Members
  • 33,826 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:04:57 AM

Posted 26 September 2023 - 12:48 PM

Take a picture with your phone then upload to https://www.imgbb.com and share link.

US Navy Veteran from 2002 to 2006

Masters in Computer and Digital Forensics Expert - Stevenson University Alumni 2015

Arch Desktop - https://termbin.com/epij

Arch Laptop - https://www.termbin.com/dnwk

Ubuntu Server - https://termbin.com/zvra


#9 Nukecad

Nukecad

  •  Avatar image
  • Members
  • 946 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:UK Lake District
  • Local time:04:57 AM

Posted 27 September 2023 - 06:58 AM

The Image tool in this thread asks for a URL, so  I can not show you a screenshot of the Command Prompt Page.

Click "More Reply Options" at the bottom right of the editor.

 

You can then use "Attach Files" to browse to an image on your computer to upload it,
then click "Attach this file" and once it is showing as attached click "Add to Post".

Attached File  Capture.JPG   20.97KB   0 downloads

Attached File  Capture2.JPG   34.32KB   0 downloads


Edited by Nukecad, 27 September 2023 - 07:06 AM.

*** Out of Beer Error ->->-> Recovering Memory ***


#10 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 27 September 2023 - 08:02 AM

Bleepin Madman - "Take a picture with your phone" I KNOW this come natural to millennials and their ilk, but NOT to me.

 

Garlin - please find the screenshot you ordered... which I have been able to attach, courtesy of Nukecad

Attached Files



#11 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 237 posts
  • OFFLINE
  •  
  • Local time:03:57 PM

Posted 06 November 2023 - 03:27 PM

It rather looks like the most promising technique is to depower the drive and power it again -  that fixes it SOMETIMES if not always.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users