I want both the user names. From which machine. From which user accessed which machine with which user name
Main Topics
Browse All TopicsHi,
Domain admin accesses machine. From and to with User name.
Code from Rob. At present it gets the From and to machine data. Can i get the User name from which machine its accessed too.
So final result would be as
11/2/2009 7:22:44 PM From_Machine accessed T o_Machine administrator by Username
Regards
Sharath
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You'll have to turn ON the "Terminal Services Session Directory logging service"
more info in:
http://support.microsoft.c
I got this
--------------------------
--------------------------
Getting current user from DEV1231
--------------------------
OK
--------------------------
I tried the script on my machine
--------------------------
--------------------------
DEV\sharath
--------------------------
OK
--------------------------
If i run the code in The mstsc machine i get
--------------------------
Windows Script Host
--------------------------
Script: E:\Rob.vbs
Line: 2
Char: 1
Error: Invalid use of Null: 'GetCurrentUsername(...)'
Code: 800A005E
Source: Microsoft VBScript runtime error
--------------------------
OK
--------------------------
Dev1231 and D306 are 3 physical machines
I-DSM machine is the one i am connecting remotely via mstsc
I get this and no schedule task created
D:\>Schedule_Task_Temp.bat
D:\>setlocal
D:\>pushd D:\
D:\>set logfile=C:\DOCUME~1\ADMINI
D:\>del /f /q C:\DOCUME~1\ADMINI~1.DEV\L
The system cannot find the file specified.
D:\>set log=>>C:\DOCUME~1\ADMINI~1.D
D:\>set doc_and_set=C:\Documents and Settings
D:\>echo ****Wed 11/04/2009**10:45:23.99***
OCALS~1\Temp\1\_dellog.log
The system cannot find the path specified.
D:\>call :_DEL_ALL_TEMP
D:\>cd /d "C:\Documents and Settings" || goto :_ERR
C:\Documents and Settings>for /F "delims=:" %U in ('dir /b /a:d') do (
rem Del user temp
call :_EMPTY "C:\Documents and Settings\%U\Local Settings\Temp"
rem *** Del IE cache
call :_DELDIR "C:\Documents and Settings\%U\Local Settings\Temporary Internet F
iles\Content.IE5"
rem *** del files and dirs in c:\temp
rem call :_EMPTY "C:\temp"
rem *** del files and dirs in C:\windows\temp
rem call :_EMPTY "C:\windows\temp"
)
C:\Documents and Settings>(
rem Del user temp
call :_EMPTY "C:\Documents and Settings\Administrator\Loc
rem *** Del IE cache
call :_DELDIR "C:\Documents and Settings\Administrator\Loc
Internet Files\Content.IE5"
rem *** del files and dirs in c:\temp
rem call :_EMPTY "C:\temp"
rem *** del files and dirs in C:\windows\temp
rem call :_EMPTY "C:\windows\temp"
)
C:\Documents and Settings>rem *** remove all files, folders and subfolders
C:\Documents and Settings>rem ***
C:\Documents and Settings>if not exist "C:\Documents and Settings\Administrator\
Local Settings\Temp" goto :_ERR
C:\Documents and Settings>++C:\Documents and Settings\Administrator\Loc
gs\temp 1>>C:\DOCUME~1\ADMINI~1.DEV\
The system cannot find the path specified.
C:\Documents and Settings>rem *** change disk and Dir
C:\Documents and Settings>(cd /D "C:\Documents and Settings\Administrator\Loc
Settings\Temp" 1>>C:\DOCUME~1\ADMINI~1.DEV\
|| goto :_ERR2
The system cannot find the path specified.
C:\Documents and Settings>echo ERROR2
ERROR2
C:\Documents and Settings>cd
C:\Documents and Settings
C:\Documents and Settings>echo ERROR
ERROR
C:\Documents and Settings>goto _END
C:\Documents and Settings>rem *** remove all subfolders and all files in the sub
folders
C:\Documents and Settings>rem *** Leave only files in the root
C:\Documents and Settings>rem ***
C:\Documents and Settings>if not exist "C:\Documents and Settings\Administrator\
Local Settings\Temporary Internet Files\Content.IE5" goto :_ERR
C:\Documents and Settings>rem *** change disk and Dir
C:\Documents and Settings>(cd /D "C:\Documents and Settings\Administrator\Loc
Settings\Temporary Internet Files\Content.IE5" 1>>C:\DOCUME~1\ADMINI~1.DEV\
LS~1\Temp\1\_dellog.log 2>&1 ) || goto :_ERR
The system cannot find the path specified.
C:\Documents and Settings>echo off
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
ERROR2
C:\Documents and Settings
ERROR
The system cannot find the path specified.
ERROR
C:\Documents and Settings
The system cannot find the path specified.
The system cannot find the path specified.
D:\>
Any help with this
http://www.experts-exchang
Business Accounts
Answer for Membership
by: x-menPosted on 2009-11-03 at 01:57:02ID: 25727373
the last output from the script IS the user name (objNetwork.UserName)