Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
user name in batch code
Name: RMDan Date: October 21, 2008 at 15:44:17 Pacific OS: Xp CPU/Ram: ? Product: G
Comment:
Im making a batch file im going to put in the all ussers start folder to log what time each user logs on to my laptop. Ive got it so i can log time and date, but is it possible to log what user with a system vatriable(like the %time% and %date% functions)?
Heres my code at the moment: @echo off set t=%time% set d=%date% echo %d%-%t%>>time.txt
Going to set the date as the file name later after i figure out the user log part.
Name: Valerie (by Garibaldi) Date: October 21, 2008 at 19:23:46 Pacific
Reply:
%username% ?
0
Response Number 2
Name: klint Date: October 22, 2008 at 02:07:58 Pacific
Reply:
The "proper" way of doing this is to use a security audit policy. In Control Panel select Administrative Tools, then Local Security Policy. In the tree on the left, expand Local Policies and then Audit Policy. You can then turn on various audits, including Logon, but also some other events you may be interested in.
You can then view these events in the Security section of Event Viewer.
Summary: Ima using vb6 & my problem is to search the patient name in the DataGrid Control 6 (OLEDB). I use a text box & here i want that when i enter the name suppose "Jone" all the names which started with n...
Summary: I have a batch file which displays a list of databases and allows the user to choose the one that they wish to start by typing in the name of the database (I use a "set /p" command to get the user inp...
Summary: HI Trying to compare 2 file names and then react depending whether they are the same or not. Code as follows: for /f %%a IN ('dir "c:\test\1\*.ver" /b') do @echo %%a for /f %%b IN ('dir "c:\test\2\*.v...