Loaduserprofile does not load user profile

  • Thread starter Thread starter Balamurugan KR
  • Start date Start date
B

Balamurugan KR

I am running to an issue where loaduserprofile does not load user profile
but returns sucess.

I am trying to start a process under different identity. (c:\test.bat is the
process to be started which has one command echo %username%)

I created token using logonuser
duplicatedtoken
createenvironmentblock
loaduserprofile
createprocessasuser

After this when i read the output i get only "echo " <<< mising user name
here>>>
 
What makes you think the Profile isn't loaded?
echo %username% is simply displaying the environment variable USERNAME, so
your problem is the environmentblock which should be created after the
profile has been loaded.

Willy.
 
Thanks Willy for the reply

I move createenvironmentblock after loaduserprofile, still the problem
continues.
 
Back
Top