VBS to backup last logged in user registry

im looking for a script to export last logged in user registry ( HKCU ) and run it as a shutdown script .
if i dont run it as last logged in user , it will run as System ... any idea?  
Thank you ,
rad0ssAsked:
Who is Participating?
 
Shaun VermaakConnect With a Mentor Technical Specialist/DeveloperCommented:
Not VBS but you can easily use this in a batch logoff script
reg export HKCU %USERPROFILE%\%RANDOM%.reg

Open in new window

0
 
rad0ssAuthor Commented:
wont it use "system" as %userprofile% if i ran it as shutdown script ?
0
 
Shaun VermaakConnect With a Mentor Technical Specialist/DeveloperCommented:
Run it as logoff
0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Best solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.