Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


RBCC

UNatended install and Runsychronous

Recommended Posts

Can I use RunSyncronous in the Winsim answer file creater to run a batch file ?   I have a batch that is named apps.bat ,   where do I put it on the usb that I have WIndows 10 Pro setup with a Unattended.xml and autoUnattended .xml  on it.    And then how do I run the batch from  from Runayschronous.xml  and RunSynchronous to run the batch file in audit or specialize mode ?   Thank you John

Share this post


Link to post
Share on other sites

I have two ways to accomplish this, although I am sure there are more.

1. Mount the image and put the batch file and other files into the image someplace.
2. Copy those files after image deployment.

Because it seems to me that the files need to exist in the image, or in the OS in order to execute them. My primary method of deployment is using DISM, and sometimes I will just copy things to the deployed image afterwards before rebooting.

I typically use FirstLogonCommands in oobeSystem phase.

Share this post


Link to post
Share on other sites

I am in the downloading the updates and the insider preview,  I am going to create a answer file,   like this one :

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <DiskConfiguration>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Type>Primary</Type>
                            <Extend>true</Extend>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>NTFS</Format>
                            <Label>Ten</Label>
                            <Letter>C</Letter>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>

 I would like to run a batch file right here! which will create directories , apps installs and driver installs all which have silent and where to install them on the command line, but I need to know what I need to do this before it calls the batch file,   How do I call the batch file and what do I put in this spot?  John

 

Share this post


Link to post
Share on other sites

NOw If I have a batch file that has this:

 

Drives.bat

md d:\apps\video

md d:\apps\graphics

md d: \apps \sound

md e:\utils\HD

md e:\utils\Drive

md e:\file \renamer

end

 

In my specialize section of my WIM unattended file :

I would like to use RunSyncronous to run  drives.bat  during specialize!!!

Screen.jpg.7f5d3d1531dc9bf9b892c3b4327b8009.jpg

Share this post


Link to post
Share on other sites

NOw I will reply:   Do I put this on the Windows setup USB if so where?      how do I call this batch from another?  JOhn

Share this post


Link to post
Share on other sites

You can put a path to a .cmd in the object you wish to use.

As for your other question, if you are meaning you are only asking for clarification of item #2 I put above, you can put it on the USB or anywhere else. I typically do not make a USB that has the windows image on it, instead keep everything on a network drive.

EDIT: topics merged.

In response to the post showing the screenshot. You would want to do this step during windowsPE phase because it is the only phase in which you can garauntee that the drive letters are assigned to the appropriate volumes. The letters may change and be assigned to different volumes after the reboot (in specialize or oobeSystem phase) and in my experience, there is no 100% garauntee on drive letters being correct after the reboot... of course it depends on the configuration of the system, but as a general rule this is how I know it.

Share this post


Link to post
Share on other sites
Posted (edited)

Tripredacus: I have Windows installed on a partition on my hard disk which I'm going to make a wim file from.  I was wondering Where to put my batch file and the directory where the files  that I want to install go?   In the screen shot do I put cmd /c <dir batch file> <drives.bat>  also can i install things like irfanview from the WinPE section in the answer file? And how do I call them through a batch file?

 

Thank u tripredacus

Edited by RBCC
Confusing

Share this post


Link to post
Share on other sites

You can put the files anywhere you want. I usually use a "temp" folder inside the image, and then write the .cmd file to run things from inside of that folder. At the time of deployment, the temp folder is in the root of the OS volume (for me it is W drive), but when booted, the OS volume is C:\ so I will path using that drive letter.

Share this post


Link to post
Share on other sites

I have one batch file call apps.bat  with these commands in it ,  

avast_free_antivirus_setup_offline.exe /DIR="E:\UTILS\ANTIVIRUS\AVAST" /VERYSILENT /NO RESTART
iview451_x64_setup.EXE /SILENT /FOLDER="D:\APPS\GRAPHICS\IVEIW\"
mb3-setup-consumer-3.4.4.2398-1.0.322-1.0.4470 /register: 4P7B-MGPB-4GVD-3RN7 /DEFAULTDIRNAME=E:\utils\AntiMalware\MBAM
winamp5666_full_all.EXE D:\APPS\MUSIC\PLAYER /S
vlc-3.0.1-win64.EXE /QUIET /S /D=D:\apps\video\vlc
spybot-2.4.exe /DIR="x:\dirname" /VERYSILENT
setup.exe /D=D:\APPS\Internet\Browsers\Firefox /S
ccsetup541.exe /S /E:\UTILS\CLEANER\CRAP

in the windows directory  this calls a applications in the  windows/apps  directory  What do I put in the three Runasyncronous  command in order to run the app.bat file?   Also HOw do I make sure that I run the files in the Windows/apps folder?   can I run chkdsk and makedir here also?  apps.bat file ? Thank you John

help.png

Share this post


Link to post
Share on other sites

Stop creating new topics for ones you already have created! :angry:

I do not think you can run those commands at that phase. They would be executed in the context of the booted PE, rather than the deployed OS.

In any case, in the XML, what you put there is the path to where your batch file is located. Description you can put whatever. Order is default 1 if only one thing, if two things, then 1 on the first, 2 on the second, etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×