With Windows XP I used to run a VBS script after using a clients computer to set their user account as the last logged on user.
Unfortunately the script no longer works in Windows 7. (Resulting in some users locking out my account when they try to log on and find that their password is not the same as mine!)
Here is an example of the script I was using:
http://www.itsupportguides.com/vbs-scripts/using-vbs-to-set-the-last-user-logged-on-windows-xp
EDIT : Additional Information on our environment
Our environment:
- UAC Enabled
- Logging on as 'itsupport' account, which is a member of the Local Administrators group
- All systems now have Windows 7 Enterprise installed
- All systems are joined to an Active Directory domain
Best Answer
Thank you to those that helped with this issue.
After some further research I found that Windows 7 does not use the same 'Winlogon' registry key for storing the last loggedon user, insead it uses
The second issue I had was allowing making the VBS script run as an elivated user (Administrator) without having to use 'runas' or an elevated command prompt.
After some trial and error I created the following script which successfully changes the last logged on user for domain added Windows 7 workstations.
Hopefully others here will find it helpful - I know I will!
Set Last Loggedon - Win7.vbs
Full Source: Windows 7 - VBS script to change last user logged on user