Logon Date/Time Script Won't Run 
Author Message
 Logon Date/Time Script Won't Run

Hey-
    I need to know what is wrong with the language with script down at the
bottom.  I try to put to run it as user.bat, and I get "Syntax Not Found" or
there about.  I running Windows 2000 Server SP1.  Any information would be
very helpful.
Thanx,
James Schreiber

----------------------------------------------------------------------------
---------------

3437 ? How do I display the previous logon date/time in a logon script?
If you run your logon script visible, you might want to display a previous
logon message to your users, similar to:
Last logon was 03/01/2001 10:16 from computer name <Computer Name>.
To implement this display function:
1. Create a LastLogon$ share on your PDC.
2. Grant the Everyone full control on the share.
3. Set the NTFS permissions on the shared folder to:
    Authenticated Users - Read + Add (write).
    Creator Owner - Change.

call :lastLogon <\\PDCname>
Goto end
:LastLogon
setlocal
set PDCname=%1
if exist "%PDCname%\lastlogon$\%username%.lli" type
"%PDCName%\lastlogon$\%username%.lli"
if exist "%PDCname%\lastlogon$\%username%.lli" del /q
"%PDCName%\lastlogon$\%username%.lli"
For /f "Skip=19 Tokens=*" %%i in ('Net user "%username%" /domain') do call
:llifind "%%i"
endlocal
goto end
:llifind
set line=%1
set line=%line:"=%
if not "%line:~0,10%" EQU "Last logon" goto end

:end
NOTE: The first time a user logs on after you implement the script, nothing
is displayed, but the the event is recored at
%PDCname%\lastlogon$\%username%.lli.
NOTE: See WhereIs.



Tue, 23 Sep 2003 03:18:39 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Logon Date/Time Script Won't Run

2. Logon Script won't run in Windows 98

3. logon script won't run

4. Simple script won't run on certain user's PC

5. Compare date in form with date/time in form with date/time in database

6. Ghostscript won't run from script.

7. VBS Scripts won't run, bad association?

8. Remote Admin Scripts won't run

9. scripts won't run on 2k prof

10. Script won't run with WSCRIPT/CSCRIPT

11. Scripts won't run in XP

12. Login Script won't Run

 

 
Powered by phpBB® Forum Software