User input variable replacement

July 21, 2010 at 06:17:14
Specs: Windows XP
I'm trying to automate usmt. I need to migrate only select profiles and I don't want to have to edit the batch every time the username changes. This is what I have so far.

set /p 1=Enter profile name you wish to backup and press Enter^:

scanstate.exe \\server\USMT\Migration\%COMPUTERNAME%\Store /ue:*\* /ui:%USERDOMAIN%\%1% /i:Miguser.xml /i:MigApp.xml /o /c

Now I want to be able to somehow get user input for the profile they want to backup and place that input where %1% is. Is this possible? Any help is greatly appreciated.

See More: User input variable replacement

Report •

July 21, 2010 at 07:16:51
I think you might have almost answered your own
question here. Don't use 1 as a variable name
though - %1, %2, etc. are used internally for
command line arguments and such.

Report •

July 21, 2010 at 07:20:14
If I use xname for example, nothing happens. It will just backup the shared items on the computer and skip over the profile. It acts you didn't put in anything.

Report •

July 21, 2010 at 08:17:50
Not sure what to suggest, to be honest, except that maybe
it's a quoting issue?? (I'm not familiar with scanstate so I'm
in the dark as far as that's concerned...)

Report •
Related Solutions

Ask Question