Windows XP Script to format drive - Subaru Enthusiast Forum - ScoobyNet.com
Subaru Discussion Forums

Go Back   Subaru Enthusiast Forum - ScoobyNet.com > Community > Computer & Technology Related


Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Windows XP Script to format drive

Reply
 
 
 
Thread Tools Search this Thread
Old 21 March 2006, 12:53 PM   #1
mike1210
Geek
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,924
Default Windows XP Script to format drive

Ive just done a build for xp that calls a batch file which installs extra packages once xp is built (office 2003, adobe etc). This runs fine but i was wondering wheather its possible to get a script to format the d: drive into NTFS silently. The initial setup of xp is ran manualy so we select to install xp on c drive and make 2 partitions (c and d). the answer file calls a script on a server which pulls the packages down like below.

\\server\install\office.exe transform etc
\\server\install\adobe.exe /silent switch

ive searched on google and the like and know the syntax but i could only get it to format into a raw drive or prompt for input, this may be the only way as the potential nasty uses this could have but i thought id see if anyone knows different.

Main Reason for this is that a package that i install must have 2 partitions or it wont install. The D drive partition exists but isnt formatted or converted.
mike1210 is offline   Reply With Quote
Old 21 March 2006, 01:43 PM   #2
bob269
Scooby Regular
 
Join Date: Mar 2003
Posts: 2,654
Default

Would'nt you just use format D: /FS:NTFS /V:LABEL

This would only prompt you when its finished.

or

convert d: /fs:ntfs



Last edited by bob269; 21 March 2006 at 01:56 PM.
bob269 is offline   Reply With Quote
Old 21 March 2006, 02:19 PM   #3
mike1210
Geek
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,924
Default

by doing that it still says "all data will be lost continue y/n"

i need it to be totally silent just before the package installs, i think it may not be possible. The partition is made but not formatted or converted. Answer file can auto partition but only to one drive
mike1210 is offline   Reply With Quote
Old 21 March 2006, 02:40 PM   #4
mike1210
Geek
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,924
Default

think ive got it think its

format D: /FS:NTFS /V:LABEL /Q /Y
mike1210 is offline   Reply With Quote
Old 21 March 2006, 10:28 PM   #5
David_Wallis
Scooby Regular
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,240
Send a message via MSN to David_Wallis
Default

if that doesnt work.. use autoit.. its a bodge but would work, and do it via keypresses rather than the mouse..

David
David_Wallis is offline   Reply With Quote
Old 22 March 2006, 09:47 AM   #6
Foot_Tapper
Scooby Regular
 
Join Date: Aug 2002
Posts: 1,977
Default

Have found another way.. use diskpart.exe already in xp's sys32 directory
( unless its there coz ive installed all the admin tools )

go to here and scroll down
http://www.microsoft.com/technet/pro...c12621675.mspx

here's a bit of it :

Creating DiskPart Scripts
You can create DiskPart scripts in text files by using any extension. To run a DiskPart script from the command line, type:

diskpart /s testscript.txt
To create a log file of the DiskPart session, type:

diskpart /s testscript.txt > logfile.txt
DiskPart does not have a format command. You must run the format command from the command prompt either manually or by using a batch file. The following example shows a batch file called Formatpart.bat and a DiskPart script called Createpart.txt. The batch file executes the DiskPart script and then runs the format command.

In Formatpart.bat:

diskpart /s createpart.txt
format g: /fs:ntfs
In Createpart.txt:

select disk 1
create volume simple size 4096
assign letter g

ta very much, off for a *** (smoke)
Foot_Tapper is offline   Reply With Quote
Old 22 March 2006, 09:53 AM   #7
David_Wallis
Scooby Regular
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,240
Send a message via MSN to David_Wallis
Default

Interesting
David_Wallis is offline   Reply With Quote
Old 22 March 2006, 10:45 AM   #8
mike1210
Geek
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,924
Default

cheers guys i was looking into diskpart but the scripts would have been an **** as i aint a demon scripter, im a muppet scripter

the one i mentioned works ( format D: /FS:NTFS /V:LABEL /Q /Y) and ive put the command half way down the program list as then if people click the batch file it doesnt format your drive straight away (if you have admin rights).

im looking now to add domin security group sids into local admin without being on the domain. Or doing it a much better way using RIS and riprep
mike1210 is offline   Reply With Quote
 
 
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
2004 (54) Blue JDM Widetrack STi Fresh Import KAS35RSTI Subaru 21 03 February 2016 04:13 PM
BUGEYE PRODRIVE STI BREAKING(bc br's/rota's/afterburner/6speed/ej207/brembos/prodrive Mattybr5@MB Developments Full Cars Breaking For Spares 12 18 November 2015 07:03 AM
Track tyres, Need grippy from cold FuZzBoM Wheels, Tyres & Brakes 16 04 October 2015 09:49 PM
Subaru full forged 2.1 blobeye 468 bhp Ganz1983 Subaru 5 02 October 2015 09:22 AM
MacDrive Pro Littleted Computer & Technology Related 0 25 September 2015 08:44 AM


Tags
2008, batch, diskpart, drive, format, fsntfs, ntfs, script, scripted, scripting, scripts, server, silent, windows, xp

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



All times are GMT +1. The time now is 09:25 AM.