rkremser
asked on
how to create partitions using a % of drive from 32 bit enviroment (scripting)
I am trying to write a script to partiton and format a drive into two equal parts in a windows xp preinstall enviroment (32 bit) It rules out fdisk and diskpart doesn't take % of the drive.
I don't know how to write the script, but there are several programs out there that do this for you. The one that I have found works best is Norton PartitionMagic (http://www.powerquest.com/home_homeoffice/products/overview.jsp?pcid=sp&pvid=pm80).
ASKER
humm, I really am looking specifically for a program that I can script into another setup, thanks anyone else?
Check out these three links
http://www.robvanderwoude.com/fdisk.html
http://bharucha.com/tp701/fdiskSecrets.html
http://support.microsoft.com/kb/325590
http://www.dcs.gla.ac.uk/~norman/pdf/FDisk%20TecTips.pdf seems to be pretty nice.
This is kinda cheezy but you can build on this script I made:
@echo off && cls && color 0a
echo Coded by Syn4k on AIM
for /l %%i in (1, 1, 5) do echo.
echo Starting Partition Manager...
set /p drive="Enter drive letter: "
set /p size="Enter total size of drive to split [in MB]: "
set /a size=%size%/2
format %drive% /fs:NTFS /q /x /a:%size%
Just name it something like formatt.cmd when saving it.
http://www.robvanderwoude.com/fdisk.html
http://bharucha.com/tp701/fdiskSecrets.html
http://support.microsoft.com/kb/325590
http://www.dcs.gla.ac.uk/~norman/pdf/FDisk%20TecTips.pdf seems to be pretty nice.
This is kinda cheezy but you can build on this script I made:
@echo off && cls && color 0a
echo Coded by Syn4k on AIM
for /l %%i in (1, 1, 5) do echo.
echo Starting Partition Manager...
set /p drive="Enter drive letter: "
set /p size="Enter total size of drive to split [in MB]: "
set /a size=%size%/2
format %drive% /fs:NTFS /q /x /a:%size%
Just name it something like formatt.cmd when saving it.
ASKER
ok i worked around it with diskpart in the win 2k preinstall enviroment here is the script i used.....
diskpart /s scr.txt
echo /\
echo " ||
echo "
set /p size=Enter half disk size in MB:
copy r:\temp\new.txt r:\temp\scr2.txt
echo create partition primary size=%size%>>r:\temp\scr2. txt
echo active>>r:\temp\scr2.txt
echo create partition extended>>r:\temp\scr2.txt
echo create partition logical>>r:\temp\scr2.txt
echo assign letter==t>>r:\temp\scr2.tx t
diskpart /s r:\temp\scr2.txt
del r:\temp\scr2.txt
format t: /v: /FS:NTFS /Q /Y
scr.txt
select disk=0
list disk
scr2.txt
select disk=0
clean
diskpart /s scr.txt
echo /\
echo " ||
echo "
set /p size=Enter half disk size in MB:
copy r:\temp\new.txt r:\temp\scr2.txt
echo create partition primary size=%size%>>r:\temp\scr2.
echo active>>r:\temp\scr2.txt
echo create partition extended>>r:\temp\scr2.txt
echo create partition logical>>r:\temp\scr2.txt
echo assign letter==t>>r:\temp\scr2.tx
diskpart /s r:\temp\scr2.txt
del r:\temp\scr2.txt
format t: /v: /FS:NTFS /Q /Y
scr.txt
select disk=0
list disk
scr2.txt
select disk=0
clean
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.