Martin Zugec Posted April 20, 2005 Share Posted April 20, 2005 Hi! I am planning to include USMT in my unattended process - everything looks fine. I am able to save user profile, also I am able to redeploy it. As I said it is unattended process So my user migration is working automatically - technician send package to computer (Unicenter Software Delivery 4.0), this package will automatically save the profile to network, PC will be reinstalled with applications etc. and after this process profile will be loaded. My problem is with automatization - loading works great, but I have few problems with saving - after I tried to save profile, I always get message Error 5: Failed to inicialize infrastructure. I included my script for saving profiles, do you have any ideas? @echo offclsset UsmtPath=\\server\usmtTitle Deleting logsIf exist %UsmtPath%\logs\%ComputerName% rmdir /s /q %UsmtPath%\logs\%ComputerName%If exist %UsmtPath%\Profiles\%ComputerName% rmdir /s /q %UsmtPath%\Profiles\%ComputerName%rem Reading date formatfor /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo.^|date') do ( set A=%%a&set B=%%b&set C=%%c) rem Converting + saving dateset t=2&if "%date%z" LSS "A" set t=1for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo.^|date') do ( for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do ( set dd=%%d&set mm=%%e&set rr=%%f))call:PrevedDatumset /a strDnesnyDatum=strUniversalDaterem Loading filesfor /f "tokens=1-7 delims=:.-/ " %%a in ( 'dir "C:\Documents and Settings" 2^>nul^|findstr /v /b /c:" "') do ( If "%%g" NEQ "" ( set %A%=%%a&set %B%=%%b&set %C%=%%c&set strProfile=%%g call:PrevedDatum call:Kod ))Title Creating user profile:Savemkdir %UsmtPath%\logs\%ComputerName%Title Saving user profile%UsmtPath%\bin\scanstate.exe %UsmtPath%\profiles\%ComputerName% /i:%UsmtPath%\Bin\MigSys.inf /i:%UsmtPath%\Bin\MigUser.inf /i:%UsmtPath%\Bin\MigIsm.inf /i:%UsmtPath%\Bin\ExcludeDir.inf /i:%UsmtPath%\Bin\IncludeFiles.inf /i:%UsmtPath%\Bin\sysfiles.inf /compress+ /l:%UsmtPath%\logs\%ComputerName%\SaveDetails.log /progress:%UsmtPath%\logs\%ComputerName%\SaveSummary.log /o /v:1 /c /localonly %UsmtProfile%pauseGoto :EOF:PrevedDatumrem Converting to Julian calendarset /a dd=100%dd%%%100,mm=100%mm%%%100set /a z=14-mm,z/=12,r=rr+4800-z,m=mm+12*z-3,strUniversalDate=153*m+2set /a strUniversalDate=strUniversalDate/5+dd+r*365+r/4-r/100+r/400-2432046goto:eof:Kodset /a strRozdielDatumov=strDnesnyDatum-strUniversalDateIf %strRozdielDatumov% LSS 30 set UsmtProfile=%UsmtProfile% /user:PRE\%strProfile%goto:eof Link to comment Share on other sites More sharing options...
Dahi Posted April 20, 2005 Share Posted April 20, 2005 I've never seen that error - I dont use USMT very often.Are your users members of a domain? USMT may not work with Workgroup users.I use the following command line options%USMTCMD%\scanstate.exe "%USMTPATH%" /i "%CFGPATH%\sysfiles.inf" /i "%CFGPATH%\Migapp.inf" /i "%CFGPATH%\Migsys.inf" /i "%CFGPATH%\miguser.inf" /i "%CFGPATH%\UserData.inf" /l "%USMTPATH%\scanlog.txt" /v 7 /x /s /f /o /q Link to comment Share on other sites More sharing options...
Martin Zugec Posted April 20, 2005 Author Share Posted April 20, 2005 Yep, my users are domain users of course. Could you please try to run your scanstate under diffeerent user profile, that dont have profile in that computer (using RunAs)? It could really help me to know if it is fault in my code, or in USMT Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now