Loaduserprofile does not load user profile

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>>>
 
W

Willy Denoyette [MVP]

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.
 
B

Balamurugan KR

Thanks Willy for the reply

I move createenvironmentblock after loaduserprofile, still the problem
continues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top