Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


how to create partitions using a % of drive from 32 bit enviroment (scripting)

Posted on 2006-05-30
Medium Priority
Last Modified: 2010-04-03
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.
Question by:rkremser

Expert Comment

ID: 16794200
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).

Author Comment

ID: 16797592
humm, I really am looking specifically for a program that I can script into another setup, thanks anyone else?

Expert Comment

ID: 16811783
Check out these three links

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.

Author Comment

ID: 16843053
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.txt
diskpart /s r:\temp\scr2.txt
del r:\temp\scr2.txt
format t: /v: /FS:NTFS /Q /Y

select disk=0
list disk

select disk=0

Accepted Solution

ee_ai_construct earned 0 total points
ID: 16878075
Closed, 50 points refunded.
Community Support Moderator
replacement part #xm34

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question