茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1671391 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
PIMG_00016.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

微軟帝國 : [轉貼]How To Open Disk Management From Command Prompt

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]How To Open Disk Management From Command Prompt

How To Open Disk Management From Command Prompt

Execute DISKMGMT.MSC for Quick Access to the Disk Management Tool

A quick way to open the Disk Management utility in any version of Windows is from the
Command Prompt. Just type a short command and the Disk Management utility starts instantly.

Disk Management is buried several layers deep in most versions of Windows so having a faster way to access this super-tool for your hard drives and other storage devices can really come in very handy.

The Disk Management command is the same in all versions of Windows so these instructions apply equally to
Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.

Follow these easy steps to start Disk Management from the Command Prompt in Windows:

Tip: Not comfortable working with commands? You can also
Open Disk Management From the Computer Management Tool in Windows. (This is easy and fast, though, we promise!)

How To Open Disk Management From Command Prompt

Time Required: Opening Disk Management from the Command Prompt only takes several seconds and probably much less once you learn the command.

  1. In Windows 10 and Windows 8, open Run from the Start menu or Apps screen (or see the A Quicker Method... section at the bottom of the page for an even faster way to get to Disk Management than using its command).

    In Windows 7 and Windows Vista, click on the Start button.

    In Windows XP and earlier, click on Start and then Run.
  2. Type the following Disk Management command in the text box:

    diskmgmt.msc
    ...and then hit the Enter key or press the OK button, depending on where you ran the command from.


    Note: Technically, opening Disk Management from the Command Prompt would require that you actually open the Command Prompt program. However, running an executable program like diskmgmt.msc from the search or run box accomplishes the same thing.

    Note: Also, technically, diskmgmt.msc is not the "Disk Management command" any more than any non command-line tool's executable is a "command." In the strictest sense, diskmgmt.msc is just the run command for the Disk Management program.
  1. Disk Management will open immediately.

    That's it! Now you can now use Disk Management to
    change drive letters, partition a drive, format a drive, and more.

A Quicker Method in Windows 10 & Windows 8

Are you using a keyboard or
mouse with Windows 10 or Windows 8? If so, opening Disk Management via the Power User Menu is even faster than via its run command.

Just press the WIN and X keys together to bring up the menu, then click on the Disk Management shortcut. In Windows 10 and Windows 8.1, right-clicking on the Start button works to bring up the Power User Menu too.

In Windows 10, you could also execute diskmgmt.msc directly from the Cortana interface, which is nice if you're used to using that to execute commands already.


原文出處:
How To Open Disk Management From Command Prompt
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]How to mount and unmount hard drives under Windows (the unix way)
How to mount and unmount hard drives under Windows (the unix way)

On my work computer I have two USB hard drives that I use rarely. They have a power save mode that sends them into sleep after a couple of minutes of them being idle.
Whenever I open a context menu on a file, the drives are woken up (most likely caused by the "send to" handler). So I eject the drive, but I can't find a way to get it back, other than unplugging and replugging it in.
Is there a way to unmount the drives, and then remount them only when I actually need them? (On Windows 7 Ultimate.)



Remove the drive letters using mountvol or diskmgmt.msc. Without a drive letter, they won't appear under Computer or Send To.
mountvol Q: /p

Using /p will actually dismount the device. On older Windows versions, you only have /d, which only unassigns the drive letter, but keeps the volume mounted.
Reassign when needed, using the volume ID printed by mountvol:
mountvol Q: \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\

You can also mount the volume on an empty folder (Unix style) using the same tools:
mkdir C:\fs\backup-disk
mountvol C:\fs\backup-disk \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\

All these operations require Administrator privileges.
(In fact, you might even be able to directly use the volume ID in your backup scripts, without having to mount it anywhere. For example, \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\projects instead of Q:\projects.)



Use DISKPART to set your disk offline
It will stay offline even after a restart or a new power on
Use DISKPART to set it back online
This can be done in scripts
command file to put disk 2 offline:
Offline.cmd

 echo list disk              > c:\windows\temp\namexxxx.none
 echo select disk 2         >> c:\windows\temp\namexxxx.none
 echo offline disk          >> c:\windows\temp\namexxxx.none
 echo exit                  >> c:\windows\temp\namexxxx.none
 diskpart /s c:\windows\temp\namexxxx.none
 erase c:\windows\temp\namexxxx.none
 pause

command file to put disk 2 online:
Online.cmd
 .
 echo select disk 2 ........
 echo online disk ......
 .

Execute as administrator

原文出處:How to mount and unmount hard drives under Windows (the unix way) - Super User
前一個主題 | 下一個主題 | 頁首 | | |



Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|