d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > How To Use Run, Cmd & Diskpart Revised
12Next
Closed New Topic New Poll
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 21 2021 03:43am
Hello Everyone! This Is My PC Repair Cheat Sheet For Everthing That Hasn't Been Made A Cartoon
I Couldn't Edit The Last Post With Over 1200 Views & I Had Things Like TBs Labeled GB Lol
I Spent A lot Of Time Putting This All Together Reading, Watching Videos & Fixing Or Building PCs
I Was Just Doing It To Help Ppl Or Play My Beloved D2 Game But I Hope This Post Helps More Ppl Wee





ALWAYS TYPE exit & PRESS ENTER TO CLOSE COMMAND PROMPT & DISKPART WHEN DONE





TO OPEN COMMAND PROMPT WHEN USING A WINDOWS INSTALLATION APP OR REPAIR TOOL


Press: Shift + F10 (Make Sure FN-Keys Are Off & F-Keys Are On In Bios)


Or Select: Repair Your Computer/ Advanced Options/ Troubleshoot








TO OPEN COMMAND PROMPT FROM OUTSIDE OF WINDOWS W/ CURRENT INSTALLED WINDOWS


Follow These Steps From Booted Up Windows Computer:

Open Settings App/ Update & Security/ Recovery/ Restart Now
Select Troubleshoot/ Advanced Options/ Chose Account/ Enter Password








TO OPEN COMMAND PROMPT AS ADMIN FROM COMMAND PROMPT AS NON ADMIN TYPE:


powershell -command "start-process cmd -verb runas"


This Doesnt Always Work But Maybe Type: c: (Press: Enter Then Type:)
runas /user:(computer Name) cmd (Press: Enter Then Type Password & Enter)








USING SLMGR.VBS COMMAND IN COMMAND PROMPT TO MANAGE WINDOWS KEYS

To Open Run App Press: Windows Key + R
To Open Command Prompt As Admin Type: cmd (Press: Ctrl + Shift + Enter)


slmgr.vbs /dli (To Get Basic Info Of Activated Windows Key)
slmgr.vbs /dli all (To Get Basic Info Of Windows Keys From All Time)
slmgr.vbs /dlv (To Get Detailed Info Of Activated Windows Key)
slmgr.vbs /dlv all (To Get Detailed Info Of Windows Keys From All Time)
slmgr.vbs /xpr (To Get The Install Expiration Of A Volume Windows Key)
slmgr.vbs /upk (To delete Current Windows Key)
slmgr.vbs /ipk (Product Key) (To Add A New Windows Key Old One Will Erase)
slmgr.vbs /ato (To Verify Key From Windows Servers)








USING GPEDIT.MSC COMMAND IN RUN TO CHANGE ADVANCED COMPUTER & USER SETTINGS

To Open Run App Press: Windows Key + R


To Open Local Group Policy Editor As Admin Type:
gpedit.msc (Press: Ctrl + Shift + Enter)


TO TURN OFF WINDOWS DRIVERS UPDATES OR OTHER UPDATE OPTIONS CLICK:
computer configuration/ Administrative Templates/ Windows Components/ Windows Update/ Do not include drivers with Windows Update/ enable the policy








USING RSTRUI COMMAND IN RUN TO OPEN WINDOWS SYSTEM RESTORE POINT APP

To Open Run App Press: Windows Key + R


To Open Windows Restore Point App Type: rstrui








USNING DXDIAG COMMAND IN RUN TO CHECK COMPUTER SPECS WITH RUN APP

To Open Run App Press: Windows Key + R


To Check System, Video & Sound Devices Specs With Run App Type: dxdiag
Click No If Diver Information Is Not Needed Or Yes If It Is








USING MSCONFIG COMMAND IN RUN TO OPEN WINDOWS SYSTEM CONFIGURATION APP

To Open Run App Press: Windows Key + R


To Open System Configuration App Type: msconfig








THE DESCRIPTION GIVES THE ANSWER __s IN THE NEXT PROCESSES ARE EITHER

Current Drive Letter= (__:)

Current Disk Or Partition Number= (__)

Drive Labels (Label Length May Be Limited)= ("___")

Format Type(FAT,FAT32,NTFS,exFAT)= (fs=____)

Partition Size In MBs= (size=____)








USING WINDOWS OFFLINE SYSTEM FILE CHECKER/REPAIR & ONLINE DISM REPAIR APP

To Open Run App Press: Windows Key + R
To Open Command Prompt As Admin Type: cmd (Press: Ctrl + Shift + Enter)



To Select Drive To Fix Type: __:
To Run System Check Type: sfc /scannow
To Reparir System Type: dism /online /cleanup-image /restorehealth
To Run System Check Type: sfc /scannow








USING CHKDSK COMMAND IN COMMAND PROMPT TO CHECK & FIX DISK DRIVES

To Open Run App Press: Windows Key + R
To Open Command Prompt As Admin Type: cmd (Press: Ctrl + Shift + Enter)



To Run Check Disk Type: chkdsk __: /f /r /x

chkdsk __: /f (Fixes Disk Errors, Clean Only)
chkdsk __: /v (Shows File Being Scaned Name)
chkdsk __: /r (Fixes Disk Errors, Rewrites Data & Labels Bad Sectors)
chkdsk __: /x (Forces Drive Being Scaned To Dismount If Necessary)








USING XCOPY COMMAND IN COMMAND PROMPT TO CLONE A DISK DRIVE TO ANOTHER

To Open Run App Press: Windows Key + R
To Open Command Prompt As Admin Type: cmd (Press: Ctrl + Shift + Enter)


To Start Complete Clone Type: xcopy __:\ __:\ /s /e /h /i /c /y



The Parameters Mean:
● /s: copy directories and subdirectories, unless they are empty. If you omit “/s”, xcopy will work within a single directory.
● /e: copy all subdirectories, even if they are empty.
● /h: copy files with hidden and system file attributes.
● /i: if in doubt always assume the destination is a folder.
● /c: continue copying even if an error occurs.
● /y: suppress prompt to confirm overwriting a file.







USING DISKPART COMMAND IN COMMAND PROMPT TO MANAGE DISK DRIVES

All Disk Drive Sizes Listed & Input Are In Megabyte(MB) Incraments
1 Gigabyte(GB) Is 1000 To 1024 Megabytes(MBs) Depending On Year Of Equiptment

To Open Run App Press: Windows Key + R
To Open Command Prompt With Type: cmd (Press: Enter)
To Open Diskpart Type: diskpart



TO MANAGE REMOVEABLE MEDIA DISK DRIVE OR HARD DISK DRIVE VOLUMES USE LIST VOL:

list volume (Lists All Non Hidden HDD & RMDD Volumes Currently Active On PC)
sel volume __ (To Select A Volume Number)


TO MANAGE A HARD DISK DRIVE USE LIST DISK & LIST PARTITION:

list disk (Lists All Hard Disk Drives Connected To PC)
sel disk __ (To Select A Disk Drive Number)
list par (Lists All Hidden & Non Hidden Partitions On Selected Disk Dive)
sel par __ (To Select A Partition Number)
Detail Par (Lists The Properties(Partition Info) Of The Selected Partition)



TO PREPARE OR CHANGE PROPERTIES OF SELECTED DISK DRIVE USE THESE COMMANDS:

clean (To Erase A Drive)(Data Can Be Recovered)
clean all (To Erase & Zero A Drive)(Data Cant Be Recovered)


convert gpt (Converts Drive To New GPT For UEFI/ +2TB Storage Drives)
convert mbr (Converts Drive To Old MBR For Legacy -2TB Drives/ Flash Drives)


create partition primary (For Full Size Partition)
create partition primary size=_____ (For Multiple Partitions)
create extended partition (For Adding Volumes To This Partition)


active (For A Bootable Drive)
inactive (For A Non Bootable Drive)


format fs=____ quick label="___" (For Quick Format & Label)
format fs=____ full label="___" (For Full Format & Label)(ntfs/fat32)
format fs=____ quick (For Quick Format)(Data Can Be Recovered)
format fs=____ full (For Full Format)(Data Cant Be Recovered)


assign (To Assign Random Drive Letter)
assign letter = __ (To Assign A Specific Drive Letter)
remove letter = __ (To Remove A Drive Letter)


shrink (To Shrink The Partition Maximum Amount Available)
shrink querymax (lists Size Partition Can Be Reduced To)
shrink desired=____ (To Shrink The Partition By A Specific Amount)
shrink minimum=____ (To Shrink The Partition By A Minimum Amount)


extend size=____ (To Extend Partition By A Specific Amount)
extend (To Extend Partition To Maximum Size Available)


delete partition (Deletes A Inactive Partition With No System Files)
delete partition override (Deletes Protected System Partitions)


attributes disk (Show If Drive Is Read Only Or Not)
attributes disk set readonly (Then Files Cant Be Written To Drive)
attributes disk clear readonly (Then Files Can Be Written To Drive)





IN THE NEXT PROCESSES AFTER MAKING SYSTEM RESERVED PARTITION AND
INSTALLING OPERATING SYSTEM USE DISK MANAGEMENT TO REMOVE ASSIGNED LETTER

Use (Windows Key + X) To Open Disk Management
Right Click System Partition To Change/Remove Letter T
Only If Using BCDboot To Copy System Partition Files To A 2nd Drive
For Fresh Install & On PCs With Only 1 Drive Use Windows Install App




HOW TO MAKE UEFI SYSTEM RESERVED PARTITION WTIH DISKPART & BCDBOOT:

clean
convert gpt
create partition efi size=____
format fs=fat32 quick label="System"
assign letter = t (Skip This Step & Go To Next Step On Fresh Install)
exit (Stop Here & Use Win Install App On Fresh Install)(Create New Par & Del)
bcdboot C:\Windows /s T: /f UEFI



HOW TO MAKE A UEFI MICROSOFT RESERVED PARTITION WITH DISKPART:

create partition msr size=____ (To Create A MSR Partition)(16MB--128MB)




HOW TO MAKE LEGACY SYSTEM RESERVED PARTITION WTIH DISKPART & BCDBOOT:

clean
convert mbr
create partition primary size=____
format fs=ntfs quick label="System Reserved"
active
assign letter = t (Skip This Step & Go To Next Step On Fresh Install)
exit (Stop Here & Use Win Install App On Fresh Install)(Create New Par & Del)
bcdboot C:\Windows /s T: /f BIOS




HOW TO MAKE LEGACY & UEFI SYSTEM RESERVED WTIH DISKPART & BCDBOOT:
This Process Can Only Be Done On A Second Drive Connected To A PC With A OS

clean
convert mbr
create partition primary size=____
format fs=ntfs quick label="System Reserved"
active
assign letter = t
exit
bcdboot C:\Windows /s T: /f ALL




HOW TO MAKE RECOVERY PARTITION WTIH DISKPART: (THIS STEP IS NOT NECESSARY)
(Windows Makes A Recovery Partition If System Reserved Partition Is Too Small)

create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
Member
Posts: 32,103
Joined: Dec 29 2009
Gold: 0.00
Oct 23 2021 09:33am
InB4 some n00b wipes their disk by running "clean" on it in diskpart.
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 23 2021 08:33pm
Quote (Surfpunk @ Oct 23 2021 08:33am)
InB4 some n00b wipes their disk by running "clean" on it in diskpart.


Lol couldn't have been more noob then me when I started and I did fine.

Make sure to only (clean all) a HDD and to only use (clean) on a SSD
(Use A SSD Cleaning App To Forever Clear And Zero A SSD Drive)

You Really Can (Clean All) A SSD Drive Around 1,000+ Times So I Do Sometimes If That Brand Does Not Have A App
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 26 2021 08:55pm
Bump
Member
Posts: 4,137
Joined: Oct 2 2008
Gold: 796.00
Oct 28 2021 09:45pm
no need to bump, it's missing context to be useful for anything. for example someone whose issue is that they need to set a partition as active in diskpart will have no idea what this is directing them to do. the rstrui tip is not really beneficial to someone, they will just open the start menu and type restore, or recovery, or something similar and it comes up. dxdiag does not give you much, someone looking for more hardware information might be left stranded. just search start for " sys" or "system information" to look at everything clearly. devmgmt.msc/device management is one of the more useful ones for solving problems.

This post was edited by purplex on Oct 28 2021 09:57pm
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 28 2021 11:59pm
Hi its just watching a simple video on YouTube to learn what your not sure about, everything has its uses, the new cartoon settings tool is fun and Microsoft is getting a lot transferred there, but not everything. I just added stuff to this list as I ran into a problem, it is not mandated to use everything on there, but when working outside of windows or in it, this is all useful information in certain circumstances. When setting up a drive with Diskpart stop after assigning a drive letter and it is only necessary to assign a drive active when making a Window install USB or a system reserved partition or such and need your system to boot from that partition, otherwise skip that step for a standard back-up drive they do not need to be active. Or say you want to have a 32 bit copy and a 64 bit copy of Windows on one install USB drive you will need to set only the one you want to boot form active at one time, I even make a partition for my set-up files. There are great videos on most of this stuff, the rest I read through hundreds of pages of Information. lol
Member
Posts: 4,137
Joined: Oct 2 2008
Gold: 796.00
Oct 29 2021 11:54pm
this just reads like a few snips from the manual of diskpart with some misc notes thrown in.

to use this part as an example: "USING WINDOWS OFFLINE SYSTEM FILE CHECKER/REPAIR & ONLINE DISM REPAIR APP"

you would want to explain a few things about it to be useful as a guide. what symptoms could this solve, what do the tools do in summary, how do they work, what's different, does the order matter, what are the outcomes of SFC, how do you deal with detected corruptions that can't be fixed (often happens, explain how to parse the log and could lead into explaining file permissions or the component store/SxS), is it possible to make the situation worse by running those commands?

This post was edited by purplex on Oct 30 2021 12:00am
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 30 2021 11:23pm
Quote (purplex @ Oct 29 2021 10:54pm)
this just reads like a few snips from the manual of diskpart with some misc notes thrown in.

to use this part as an example: "USING WINDOWS OFFLINE SYSTEM FILE CHECKER/REPAIR & ONLINE DISM REPAIR APP"

you would want to explain a few things about it to be useful as a guide. what symptoms could this solve, what do the tools do in summary, how do they work, what's different, does the order matter, what are the outcomes of SFC, how do you deal with detected corruptions that can't be fixed (often happens, explain how to parse the log and could lead into explaining file permissions or the component store/SxS), is it possible to make the situation worse by running those commands?


Yo bro I don't have time to do all the work for you, do some research, this is a guide for people who know what they are doing or want to have an idea of what can be done. If its too complex of a problem to be fixed save all your files and do a fresh install of your operating system. Wish you the best of luck, ty for the interest.

Bump
Member
Posts: 4,137
Joined: Oct 2 2008
Gold: 796.00
Oct 30 2021 11:46pm
Quote (HPonjsp @ Oct 31 2021 01:23am)
Yo bro I don't have time to do all the work for you, do some research, this is a guide for people who know what they are doing or want to have an idea of what can be done. If its too complex of a problem to be fixed save all your files and do a fresh install of your operating system. Wish you the best of luck, ty for the interest.

Bump


there's no interest i was saying this is useless. I just saw the other thread you made and now understand what is going on here, but you don't and that's for the best.
Member
Posts: 1,418
Joined: Jul 4 2018
Gold: 990.01
Oct 31 2021 03:07am
Quote (purplex @ Oct 30 2021 10:46pm)
there's no interest i was saying this is useless. I just saw the other thread you made and now understand what is going on here, but you don't and that's for the best.


Well I guess u seen this makes sense and helps people that understand or want to learn, you would have also seen d2jsp.org staff moved this post to this computer help forum. So only you and 2 other people with reading and understating problems have a problem, out of the thousands of other people who either used this information or didn't and moved on. I'm done talking to you and don't have time to deal with all your issues. So quit spamming my page and let the people who want to learn a lot about building and fixing computers, as well as myself alone. Thanks
Go Back To Computers & IT Topic List
12Next
Closed New Topic New Poll