-
Notifications
You must be signed in to change notification settings - Fork 0
/
winUSBcreator.cmd
executable file
·77 lines (77 loc) · 2.15 KB
/
winUSBcreator.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@echo off
echo !----------------!
echo '----------------'
echo This script is Written by Magnus Kiro, under the GPL License.
echo See http://www.gnu.org/licenses/ for further information.
echo .----------------.
echo !----------------!
echo date: 03.11.09 (dd.mm.yy)
pause
cls
echo ----------
echo This script will format your usb penn and make it an windows7 startup disk.
echo You need an usb penn with at least 3.5GB free space and an win7 cd/image.
echo ----------
pause
cls
echo >> c:\script1.src list disk
echo >> c:\script1.src exit
Diskpart < c:\script1.src
del c:\script1.src
echo ----------
echo Careful to continue, the disk will be formated with NTFS file system!
echo ctrl+c to abort script.
echo ----------
set /P input=[enter Disk number(0-)]
set disk=%input%
cls
echo ----------
echo Chosen disk is disk: %disk%
echo This might take some time....
echo ----------
echo >> C:\script2.src sel disk %disk%
echo >> c:\script2.src clean
echo >> c:\script2.src create part pri
echo >> c:\script2.src active
echo >> c:\script2.src format fs=NTFS QUICK
echo >> c:\script2.src assign
echo >> c:\script2.src exit
Diskpart < c:\script2.src
del C:\script2.src
cls
echo ----------
echo Formating complete.
echo Now it's time to copy the windows files!
echo ----------
pause
cls
echo >> c:\script3.src list vol
echo >> c:\script3.src exit
diskpart < c:\script3.src
del c:\script3.src
set /P inputimg=[Enter the device letter of your cdrom or location of the image file. Write full path]
set img=%inputimg%
echo ----------
echo Now set the device letter of the usb penn.
echo ----------
set /p inputusb=[usb Device letter, letter only, ':\' is added.]
set usb=%inputusb%:\
cls
echo ----------
echo Chosen location for cd image is %img%
echo The usb device is assigned the to %usb%
echo ----------
pause
cls
echo ----------
echo Making the usbdisk bootable.
echo -----------
%img%\boot\bootsect /nt60 %usb%
cls
echo ----------
echo Copying files, this will take som time ...... (less the 15min)
echo ----------
XCOPY %img%\ %usb%\ /S /E /H /Y
cls
echo Operation complete!
pause