Трикове в Командния ред на Windows (cmd)


27 мнения в тази тема

Отговорено

А за uefi?
Ето пример:
 

select disk 0
clean
convert gpt
rem == 1. Windows RE tools partition ===============
create partition primary size=300
format quick fs=ntfs label="Windows RE tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
rem == 2. System partition =========================
create partition efi size=100
rem    ** NOTE: For Advanced Format 4Kn drives,
rem               change this value to size = 260 ** 
format quick fs=fat32 label="System"
assign letter="S"
rem == 3. Microsoft Reserved (MSR) partition =======
create partition msr size=128
rem == 4. Windows partition ========================
rem ==    a. Create the Windows partition ==========
create partition primary 
rem ==    b. Create space for the recovery image ===
shrink minimum=15000
rem       ** NOTE: Update this size to match the size
rem                of the recovery image           **
rem ==    c. Prepare the Windows partition ========= 
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 5. Recovery image partition ================
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit

Изтрива диск 0 и създава 5 дяла (в това число и дял за възстановяване)

Ето и вариант с 2 дяла
 

select disk 0
clean
convert gpt
create partition primary size=300
format quick fs=ntfs label="Windows RE tools"
assign letter="T"
create partition efi size=100
rem == Note: for Advanced Format Generation One drives, change to size=260.

format quick fs=fat32 label="System"
assign letter="S"
create partition msr size=128
create partition primary
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit

 

3

Сподели публикацията


Адрес на коментара
Сподели в други сайтове

Отговорено (Редактирано)

Как да създадем ISO файл чрез команден ред - CMD


Ето една команда чрез, която може да се създаде ISO файл.

OSCDIMG -n -d -m E:\00_iso_folder E:\GeneratedISO.iso

E:\00_iso_folder  - Е името на папката и къде се намира. В случая в E:

GeneratedISO - GeneratedISO е името на новосъздаденото ISO


Ако в папката има файлове несъвместими с Windows NT 3.51 ще се появи съобщението:

ПРЕДУПРЕЖДЕНИЕ: Това изображение съдържа имена на файлове и/или директории, които НЕ СА СЪВМЕСТИМИ с Windows NT 3.51. Ако се изисква съвместимост с Windows NT 3.51, използвайте превключвателя -nt, а не -n.

В този случай използвайте -nt  а не  -n

OSCDIMG -nt -m E:\00_iso_folder E:\GeneratedISO.iso

В този случай -d  не се използва, защото ще ви излезе ГРЕШКА и предупреждение, че -nt  не може да се използва заедно с  -d

Ако добавите  -a към реда...

OSCDIMG -nt -m -a E:\00_iso_folder E:\GeneratedISO.iso

 ...ще ви излезе следната информация.

hcaz6ZX.jpeg

 

ISO 9660 Primary Volume Descriptor
The ISO 9660 data structure follows the skipped block with a series of volume descriptors, detailing the contents and types of information contained on the disk.

The ISO 9660 primary volume descriptor describes the characteristics of the ISO standard file system information present on a given CD-ROM.

The ISO 9660 primary volume descriptor acts much like the superblock of the the Unix File System, providing details on the ISO 9660 compliant portion of the disk. Contained within the primary volume descriptor is the root directory record describing the location of the contiguous root directory.

Directory entries are successively stored within this region. Evaluation of the ISO 9660 filenames is begun at this location. The root directory is stored as an extent, or sequential series of sectors, that contains each of the directory entries appearing in the root.

Since ISO 9660 works by segmenting the CD-ROM into logical blocks, the size of these blocks is found in the primary volume descriptor as well.

A CD-ROM is only compliant to the ISO 9660 file system standard if there is a primary descriptor, and when there is an ending descriptor available (the volume descriptor constitute a variable length table which contains information on how many other descriptors are present).

It is possible to have many kind of file systems and information arrangements on a single CD-ROM. However, while many other kinds of descriptors can be used to optionally record non-ISO defined information contents, the primary volume descriptor is always present.

It is even possible to have a Mixed Mode disc, containing audio tracks and data tracks on the same disc. The most common type of Mixed Mode discs is one where the first track on the disc is Mode 1 data (ISO 9660 or non-ISO 9660), and the remaining tracks on the disc are audio tracks.

Another possibility is the so called Hybrid disc, which contains an ISO 9660 part and a non-ISO 9660 part.

Referring back to this picture, the first entry is the Volume Descriptor Type (type), where it can have the following values:

Number 0: the Volume Descriptor is a Boot Record

Number 1: the Volume Descriptor is a Primary Volume Descriptor

Number 2: the Volume Descriptor is a Supplementary Volume Descriptor

Number 3: the Volume Descriptor is a Volume Partition Descriptor

Number 4-254: are reserved

Number 255: the Volume Descriptor is a Volume Descriptor Set Terminator.

The second entry is called the Standard Identifier ( id) and is set to CD001 for a CD-ROM compliant to the ISO 9660 standard.

Another interesting field is the Volume Space Size ( volume_space_size) which contains the amount of data available on the CD-ROM.

Може да си направите BAT файл за стартиране с администраторски права по следния начин:

@echo off

:: Get ADMIN Privs
:-------------------------------------
mkdir "%windir%\BatchGotAdmin"
if '%errorlevel%' == '0' (
  rmdir "%windir%\BatchGotAdmin" & goto gotAdmin 
) else ( goto UACPrompt )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute %0, "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"      
    CD /D "%~dp0"
:-------------------------------------
:: End Get ADMIN Privs

OSCDIMG -nt -m -a E:\00_iso_folder E:\GeneratedISO.iso

pause

 

Записвате горния текст с текстов редактор с разширение .bat  или  .cmd

 

Редактирано от Неделев
5

Сподели публикацията


Адрес на коментара
Сподели в други сайтове

Създайте нов акаунт или се впишете, за да коментирате

За да коментирате, трябва да имате регистрация

Създайте акаунт

Присъединете се към нашата общност. Регистрацията става бързо!


Регистрация на нов акаунт

Вход

Имате акаунт? Впишете се оттук.


Вписване