Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to run a script before launching setup

Featured Replies

Bascially, I have Windows 7 unattended (except for partition screen) from a hidden fat32 partition on my disk. I would like to modify it slightly to call diskpart to set partition 2 active, then continue with the unattended setup as normal. Anyone able to tell me quickly how I would do that?


Do you want to just partition the disk, and still offer the user the ability to select the disk? I think it needs to go into your boot-image (WinPE.wim or install.wim) in startnet.cmd (either a call to a new script, or right in there). I think that's there in the install.wim, but I'm sure it's there in the WinPE.wim.

I can't find anything for the unattended xml file that gives you the ability to run custom scripts in the WinPE stage. I am curious what you end up doing.

The following unattend.xml will start a vscript in the WinPE pass (assuming wpeinit is run). You can call diskpart from within that script (or directly).

<?xml version="1.0" encoding="utf-8"?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="windowsPE">

<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">

<RunSynchronous>

<RunSynchronousCommand wcm:action="add">

<Description>Lite Touch PE</Description>

<Order>1</Order>

<Path>wscript.exe X:\Deploy\Scripts\LiteTouch.wsf</Path>

</RunSynchronousCommand>

</RunSynchronous>

</component>

</settings>

</unattend>

/ Johan

@arwidmark

That's great. That actually answers half of a question I just posted earlier today. Thanks :)

  • Author

The following unattend.xml will start a vscript in the WinPE pass (assuming wpeinit is run). You can call diskpart from within that script (or directly).

<?xml version="1.0" encoding="utf-8"?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="windowsPE">

<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">

<RunSynchronous>

<RunSynchronousCommand wcm:action="add">

<Description>Lite Touch PE</Description>

<Order>1</Order>

<Path>wscript.exe X:\Deploy\Scripts\LiteTouch.wsf</Path>

</RunSynchronousCommand>

</RunSynchronous>

</component>

</settings>

</unattend>

/ Johan

What I actually want to do is have the system set Partition 2 active.

Here's the deal:

I have an ASUS EEE PC 1201N, with the following partitions:

Partition 1: 16MB Partition, ID=EF (Used for Boot Booster)
Partition 2: 100MB Partition, ID=07 (System Reserved)
Partition 3: 228GB Partition, ID=07 (Windows HD)
Partition 4: 4GB Partition, ID=1B (Hidden)

The 1201N has a BIOS hotkey (F9) that boots Partition 4. I modified that to contain a copy of the Windows 7 DVD (just Home Premium) and made it Unattended (had to put AutoUnattend.xml into boot.wim:2 for it to be read tho).

The problem arises that when you press F9, it sets Partition 4 active (that's all the F9 button does, searches for a 1B partition and activates it). That makes a little boo-boo in setup, as it installs the bootloader to Partition 4, which makes it a little less hidden.

So, my preferred setup would be to have the system boot from Partition 4, set Partition 2 active, then show the partition selection dialog (only so I can choose to format other partitions as needed) then continue. I already have an AutoUnattend to do everything except for the Diskpart, and I can post my exist xml if you would be able to provide exact changes, and maybe a sample "LiteTouch.wsf" (keep in mind, that due to the partition being hidden until Setup starts, I have to place AutoUnnattend.xml and any other files into boot.wim:2

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.