Made this using owexec.exe, which makes possible to execute scripts on remote computer using user account username and password.
You can download owexec.exe at http://officewarfare.net/index.php/owexec/
Make two bach files; run.bat and getNetUse.bat and place them into lansweeper actions share, see below:
-------------run.bat---------------
@echo off
\\%LANSWEEPER ACTIONS SHARE%\owexec -nowait -k "%LANSWEEPER ACTIONS SHARE%\getNetUse.bat" -copy -c %1
:CHEK
if exist "\\%LANSWEEPER ACTIONS SHARE%\temp\NetUse.txt" (
type \\%LANSWEEPER ACTIONS SHARE%\temp\NetUse.txt
del \\%LANSWEEPER ACTIONS SHARE%\temp\NetUse.txt
pause
) else (
@ping -n 5 -w 1000 0.0.0.1 > NUL
GOTO CHEK
)
------------getNetUse.bat-------------
@echo off
REM get net use
net use > \\%LANSWEEPER ACTIONS SHARE%\temp\NetUse.txt
The 'temp' folder must have full acces to all user accounts (Domain users), because owexec will copy there NetUse.txt from user computer.
In Lansweeper console make new custom action with action
{actionpath}run.bat {computer}
Tested on XP and Vista with Lansweeper 4.0
One thing I dont like, is CMD window showing on user side for a second, maybe someone can suggest how to avoid it.
Thanks, Jo from http://officewarfare.net/index.php/owexec/ for an idea
🙂