Solved

find out who logged in last to a windows server then generate back drop with the details

Posted on 2006-11-09
5
298 Views
Last Modified: 2010-08-05
Is there a any freeware program that when i log into a server it tells me
what server i am on
IP address
login time
The last person to login

Then generate the backdrop

i was looking at whoiam which does most things but doesn't tell me who logged in last.
0
Comment
Question by:KK1762
  • 3
5 Comments
 
LVL 10

Expert Comment

by:victornegri
ID: 17907662
Don't think y ou can get last logged on user from anything since once you log on,  you will overwrite the reg key that held that information  (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName).

You can generate the background pic using this utility for all the other things you wanted: http://www.microsoft.com/technet/sysinternals/Miscellaneous/BgInfo.mspx
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 17909079
bginfo is good stuff.  I assume you are after the user before you.  You could look in the profiles directory and pull out the second last one used with a batch file:

@echo off
pushd %userprofile%
cd ..
for /f "skip=1 tokens=1,2,3,*" %%a in ('dir /o-d ^| find "DIR"') do set lastuser=%%d & set lastdate=%%a & set lasttime=%%b & goto end
:end
echo Last user was %lastuser% logged off at %lasttime% on %lastdate%
popd

As to what you want to do with that then.... perhaps bginfo could look at the environment string %lastuser% as one of it's display fields and you could set the script to run as part of your login process to fill the environment variable?
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 17909782
just reading over that, what an awesome bit of work from the two of you......Well done, thats why EE is awesome to be a part of
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17910378
Cheers, I like scripting as you may have guessed :-)  Lets hope the asker with 3 deletions out 8 questions, several of which were forced accepts and a dodgy choice of answer on the other and grades A B C B thinks so too!

KK1762: You may want to read the help here:  http://www.experts-exchange.com/help.jsp#hs5 for how to deal with questions here best and get the most out of EE.

thanks

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17930750
Thanks, hope it helped

Steve
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Moving Files servers to DFS 11 57
Event ID: 5719 / Source: NETLOGON 9 149
File Server Migration from 2003 to 2008R2 3 75
DHCP server 6 63
So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question