Jump to content

rsbennett00

Member
  • Posts

    16
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by rsbennett00

  1. disk0_1 select disk 0 clean Don't miss the extra carriage return at the end there. disk0_3 select partition 1 active assign letter=c create partition primary
  2. Since I can't figure out how to get diskpart to use variables I had to add a ramdrive to the script and change startnet accordingly. Here's my new startnet: @ECHO OFF factory -winpe @echo @echo @echo @echo !!WARNING!! This script will wipe out data on the primary Hard Drive. !!WARNING!! @echo . @echo . diskpart /s x:\listpart1.txt @echo . choice /c:123 /n /t:3,5 Press 1 for advanced options or 2 for defaults. You have 20 seconds to comply. if errorlevel 3 goto 15secs if errorlevel 2 goto default if errorlevel 1 goto advanced :15secs @echo @echo choice /c:123 /n /t:3,10 Press 1 for advanced options or 2 for defaults. You have 15 seconds to comply. if errorlevel 3 goto 5secs if errorlevel 2 goto default if errorlevel 1 goto advanced :5secs @echo @echo choice /c:12 /n /t:2,5 Press 1 for advanced options or 2 for defaults. You have 5 seconds to comply. if errorlevel 2 goto default if errorlevel 1 goto advanced :advanced ECHO WARNING! Data loss is imminent. set adv= diskpart /s x:\listpart1.txt @echo . set /p adv=Would you like to repartition the primary Hard Drive? (Press C to cancel) if '%adv%'=='c' goto cancel if '%adv%'=='y' goto size if '%adv%'=='n' goto install @echo Invalid choice. goto advanced :default diskpart /s x:\default.txt goto install :cancel ECHO You have cancelled this script. pause exit :size set cpartsize= set /p cpartsize=Type a size for the C: Partition in gigabytes. (Press C to cancel) if '%cpartsize%'=='c' goto cancel @echo create partition primary size=%cpartsize%000>z:\disk0_2.txt copy x:\disk0_1.txt+z:\disk0_2.txt+x:\disk0_3.txt z:\disk0.txt >nul diskpart /s z:\disk0.txt goto install :install echo y|format c: /fs:ntfs /q >nul md c:\install md C:\distro xcopy x:\install\*.* c:\install /e /y xcopy x:\distro\*.* c:\distro /e /y cd\xppro\i386 winnt32 /syspart:c: /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\xppro\i386\winnt.sif exit
  3. I can't seem to find a way for diskpart to use variables. So now I'm trying to create a ramdrive and use the copy command to create the diskpart script file. Will post after further testing.
  4. Hmm, is that possible? Just off the top of my head something like... set cpartsize= set /p cpartsize=Type a size for the C: Partition in megabytes. diskpart /s x:\disk0.txt Then disk0.txt would look something like this? select disk 0 clean create partition primary size=%cpartsize% select partition 1 active assign letter=c create partition primary Would that work? I may have to try it next week when I get some free time.
  5. Woops, that was a test copy while we were trying to get the choice command working, which we did this morning. Here's our perfected startnet.cmd. @ECHO OFF factory -winpe @echo diskpart /s x:\listpart1.txt choice /c:12 /n /t:2,20 Press 1 for advanced options or 2 for defaults. You have 20 seconds to comply. if errorlevel 2 goto sizec25 if errorlevel 1 goto advanced :advanced ECHO WARNING! Data loss is imminent. set adv= diskpart /s x:\listpart1.txt set /p adv=Would you like to repartition the primary Hard Drive? (Press C to cancel) if '%adv%'=='c' goto cancel if '%adv%'=='y' goto size if '%adv%'=='n' goto install :cancel ECHO You have cancelled this script. pause exit :size ECHO WARNING WARNING WARNING ECHO This disk is about to wipe out the first Hard Drive in this system. It is HIGHLY recommended any secondary ECHO Hard Drives be disconnected during this process. ECHO CTRL-C now and terminate this program to prevent data loss. diskpart /s x:\listdisk0.txt ECHO Please choose from the following sizes for C:, 20, 25, 30, 35, 40 or 50 GB. set sizec= set sized= set /p sizec=Define the size you would like the C: partition in gigabytes. Use max for maximum. goto whatsize :whatsize if '%sizec%'=='max' goto maxc if '%sizec%'=='20' goto sizec20 if '%sizec%'=='25' goto sizec25 if '%sizec%'=='30' goto sizec30 if '%sizec%'=='35' goto sizec35 if '%sizec%'=='40' goto sizec40 if '%sizec%'=='50' goto sizec50 goto nosize :nosize ECHO Sorry, the size you chose for C: is not an option, please choose 20, 25, 30, 35, 40 or 50 GB. goto size :maxc diskpart /s x:\maxc.txt goto install :sizec20 diskpart /s x:\disk20.txt goto dpart :sizec25 diskpart /s x:\disk25.txt goto dpart :sizec30 diskpart /s x:\disk30.txt goto dpart :sizec35 diskpart /s x:\disk35.txt goto dpart :sizec40 diskpart /s x:\disk40.txt goto dpart :sizec50 diskpart /s x:\disk50.txt goto dpart :dpart diskpart /s x:\maxd.txt goto install :install echo y|format c: /fs:ntfs /q >nul md c:\install md C:\distro xcopy x:\install\*.* c:\install /e /y xcopy x:\distro\*.* c:\distro /e /y cd\xppro\i386 winnt32 /syspart:c: /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\xppro\i386\winnt.sif exit
  6. Here's my startnet.bat. This pretty much covers everything, you can imagine what my diskpart scripts do from here. @ECHO OFF factory -winpe @echo diskpart /s x:\listpart1.txt set def= set /p def=Press 1 for advanced options or 2 for the defaults. (Press C to cancel) if '%def%'=='1' goto advanced if '%def%'=='2' goto install if '%def%'=='c' goto cancel rem choice /c:12 /t:2,30 Press 1 for advanced options or 2 for the defaults. You have 30 seconds to comply. rem if errorlevel 2 goto size25 rem if errorlevel 1 goto advanced :advanced ECHO WARNING! Data loss is imminent. set adv= diskpart /s x:\listpart1.txt set /p adv=Would you like to repartition the primary Hard Drive? (Press C to cancel) if '%adv%'=='c' goto cancel if '%adv%'=='y' goto size if '%adv%'=='n' goto install :cancel ECHO You have cancelled this script. pause exit :size ECHO WARNING WARNING WARNING ECHO This script is about to wipe out the first Hard Drive in this system. It is HIGHLY recommended any secondary ECHO Hard Drives be disconnected during this process. ECHO CTRL-C now and terminate this program to prevent data loss. diskpart /s x:\listdisk0.txt ECHO Please choose from the following sizes for C:, 20, 25, 30, 35, 40, 50 GB or max. set sizec= set sized= set /p sizec=Define the size you would like the C: partition in gigabytes. Use max for maximum. goto whatsize :whatsize if '%sizec%'=='max' goto maxc if '%sizec%'=='20' goto sizec20 if '%sizec%'=='25' goto sizec25 if '%sizec%'=='30' goto sizec30 if '%sizec%'=='35' goto sizec35 if '%sizec%'=='40' goto sizec40 if '%sizec%'=='50' goto sizec50 goto nosize :nosize ECHO Sorry, the size you chose for C: is not an option, please choose 20, 25, 30, 35, 40, 50 GB or max. goto size :maxc diskpart /s x:\maxc.txt goto install :sizec20 diskpart /s x:\disk20.txt goto dpart :sizec25 diskpart /s x:\disk25.txt goto dpart :sizec30 diskpart /s x:\disk30.txt goto dpart :sizec35 diskpart /s x:\disk35.txt goto dpart :sizec40 diskpart /s x:\disk40.txt goto dpart :sizec50 diskpart /s x:\disk50.txt goto dpart :dpart diskpart /s x:\maxd.txt goto install :install echo y|format c: /fs:ntfs /q >nul md c:\install md c:\distro xcopy x:\install\*.* c:\install /e /y xcopy x:\distro\*.* c:\distro /e /y cd\xppro\i386 winnt32 /syspart:c: /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\xppro\i386\winnt.sif exit
  7. We got it! Hit the spacebar to boot to the dvd and it loads PE. Startnet takes off and asks if you want advanced options or the default. Hit advanced and it asks if you want to change the partitioning of the HD0 or just format your existing C: drive. Choose repartitioning and it asks how big you want the C: drive. The default option (most used in our environment) is repartition C: to 25gb and the rest to D:. From there it takes care of whatever choices you made, then copies needed files to the C: drive and kicks off the XP install. After XP finishes, then the rest of the auto-installs run and about 45 minutes later you have the following done: Installed Windows XP Pro with all possible updates (as of this date) into C:\windows Installed the entity specific Fonts Installed Adobe Acrobat Reader 7.08 Installed Lotus Notes 7 client Installed Firefox 1.5 Installed MS Office 2003 Installed Sophos 5.12 Installed Java Runtime 5.07 Installed MS .net 1 with SP1 Installed MS .net 2 Update some drivers, stick it on the domain, copy in the notes id file, update Sophos and it's ready to be deployed to the end user. This is so simple we're really not going to need ghost anymore. Thanks for all your help.
  8. Do you have the link? I'm not finding it nor is google.
  9. Ok that all makes sense when I think about what winpe, the opk and sysprep are intended to be used for and it also makes me think that since we're not sysprep'ing that the oemrunonce isn't going to do what we want. So we're now trying to use the [GuiRunOnce] section in the winnt.sif and I'll post results once we test that. I'm also thinking that further problems should probably be posted in the winpe forum now. Thanks for all your help so far JuMz.
  10. Here's my latest winbom.ini which is on the root of the dvd. [Factory] WinBOMType=WinPE Reseal=No [WinPE] Restart=No [DiskConfig] Disk1 = disk1.Config [disk1.Config] WipeDisk = Yes Size1 = 25000 Size2 = * PartitionType1 = Primary PartitionType2 = Primary FileSystem1 = NTFS FileSystem2 = NTFS ForceFormat = Yes QuickFormat1 = Yes QuickFormat2 = Yes SetActive1 = Yes [OemRunOnce] md c:\install xcopy x:\install\*.* c:\install /e /y x:\xppro\i386\winnt32 /syspart /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\xppro\i386\winnt.sif [WinPE.Net] StartNet = No
  11. We seem to be having a problem processing winbom.ini. Our CD boots, runs everything in startnet.cmd (which is factory -winpe) and then leaves us at a command prompt although there's plenty of stuff in winbom. I've seen the order that factory searches for winbom and the first one is a reg key, how can I check for reg keys on the cd?
  12. It appears there was some confusion. We were getting the file copy errors back when we were doing the windows 98 dos install using winnt.exe . We are now booting winpe and doing some trial and error testing.
  13. JuMz, I didn't elaborate on the error since I'd given up on that process of doing unattended installs. If I remember right it says Windows can't find the file xxxx.xxx and asks us to locate it. That cdrw has been blown away so I can't reproduce it anymore and it's an obsolete process. startnet.cmd executes one command. factory -winpe. Everything else is inside winbom: [Factory] WinBOMType=WinPE Reseal=No [WinPE] Restart=No [DiskConfig] Disk1 = disk1.Config [disk1.Config] WipeDisk = Yes Size1 = 25000 Size2 = * PartitionType1 = Primary PartitionType2 = Primary FileSystem1 = NTFS FileSystem2 = NTFS ForceFormat = Yes QuickFormat1 = Yes QuickFormat2 = Yes SetActive1 = Yes [OemRunOnce] md c:\install md c:\install\office xcopy x:\i386\office\*.* c:\install\office /e /y x:\xppro\i386\winnt32 /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\xppro\i386\winnt.sif [PnPDriverUpdate] [PnPDrivers] [NetCards] [UpdateInis] [FactoryRunOnce] [Branding] [AppPreInstall]
  14. I tried adding the tempdrive command since that was the easiest and it worked but XP still dies halfway through saying it can't find a bunch of files. I didn't realize WinPE did this sort of thing, I always thought it was just a liveCD so I picked up a copy of it and we're trying to get it working. I think the problem now is that I don't have the OPK (our license manager was out of the office this afternoon) so we used a dos utility to create a bootable winPE disk and that works, we get into a 32 bit shell with a command window that only runs startnet. I configured the winbom.ini and we tried extracting the boot img from that cd and throwing it all together with XP and office but it still just stopped at the same point after startnet.cmd. End of the day at that point so I'll pick it back up tomorrow. I didn't try diskpart, that's not going to run in dos 6.22 is it? Thanks for your help guys, I think winpe is definitely the best bet.
  15. So I’m trying to create an automated windows install plus office install dvd. Office is under control and works perfectly. Unattending windows is no problem in itself. However, here’s the kink. We need to repartition hard disk 1 into a 25gb C drive and the rest as a D drive. Hard drives range in size from 40gb to 300gb. Sounds simple right? If you were running the standard XP install it’s a cakewalk. However, we want this fully automated. I used the winnt.sif reference page to create my unattended install. As you know it says: Repartition=No Specifies whether to delete all partitions on the first drive of the client computer and to reformat the drive with the NTFS file system automatically. This is the only place other than to prompt for partition info or not that it talks about partitioning. So that’s the choice, leave everything as is, or repartition to a single partition. What should be very simple has become a month long quest for me. I have tried so many ways of doing this and failed at all of them. Partition Magic scripting (at least I thought it used to have scripting) has been removed by Symantec. I tried Partition Manager, even paid 300 bucks for it. It supposedly has scripting but we have as of yet been able to get it to work without breaking windows to the point that it doesn’t even boot into safe mode. I’ve worked with their tech support and stumped them. Hopefully I can return that crappy software. I tried windows 98 emulation and fdisk scripting, no dice. Lastely I’ve tried FreeFDISK from http://www.23cc.com/free-fdisk/ and it’s got me soooo close I can taste it. Here’s where I’m at. I created a windows 98 bootdisk and used nero to make the bootable dvd. I altered the autoexec.bat to execute mscdex and smartdrv then prompt the user to select which dvddrive the cd is in since I can’t find a way to automate that (I tried using IF EXIST <filename> but if there’s no disk in the drive then dos gives an abort/retry/fail error) using the choice command. Then autoexec executes the freefdisk commands off the CD. It repartitions the drive perfectly even accounting for the unknown size of the D drive, it just maximizes it. Then autoexec tries to execute the windows install using the command: X:\i386\winnt.exe /s:x:\i386 /u:x:\i386\winnt.sif And it promptly tells me it doesn’t have swap space. Now if I format the C partition with fat32 the install kicks off but then midway through says it can’t find a bunch of files… sigh. Even if it were to install, then its fat32 and I've not even started looking into automatically converting it. Any thoughts? Questions? Suggestions? I’m all ears.
×
×
  • Create New...