Skip to content

SCCM Task Sequence Start *.bat file

Featured Replies

Hello.

There is the following command

@echo off
setLocal Enabledelayedexpansion
for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
  if exist %%d:\"STORE USER ARM"\ (
xcopy %%d:"\User State Migration Tool\*.*" /e /v /y C:\Windows\USMT\
    If not exist %%d:\Store Mkdir %%d:\Store
    c:
    cd C:\Windows\USMT\Amd64
    scanstate.exe %%d:\Store\%ComputerName% /c /o /ue:%OSDCOMPUTERNAME%\* /hardlink /nocompress /i:MigApp.xml /i:MigCustom.xml /i:MigUser.xml /i:MigProgFiles.xml /v:5 /l:%%d:\Store\%ComputerName%\logs\scanstate.log /progress:%%d:\Store\%ComputerName%\logs\scanstate_progress.log
))

The idea is to run the task sequence from a flash drive and save user data on the same flash drive.

The script works, but does not work through the sequence. 

How does one make this option or maybe there is an alternative?

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

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.