→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎05-27-2010 11:06 AM
@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
)
@echo off
REM get net use
net use > \\%LANSWEEPER ACTIONS SHARE%\temp\NetUse.txt
{actionpath}run.bat {computer}
‎06-12-2015 11:20 AM
‎06-11-2015 11:33 AM
‎10-26-2010 10:42 PM
sTitle = "Batch launcher"
Set oArgs = WScript.Arguments
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
If oArgs.Count <> 1 Then
' Will die after 10 seconds if no one is pressing the OK button
oShell.Popup "Error: You need to supply a file path " _
& "as input parameter!", 10, sTitle, vbCritical + vbSystemModal
Wscript.Quit 1
End If
sFilePath = oArgs(0)
If Not oFSO.FileExists(sFilePath) Then
' Will die after 10 seconds if no one is pressing the OK button
oShell.Popup "Error: Batch file not found", _
10, sTitle, vbCritical + vbSystemModal
Wscript.Quit 1
End If
' add quotes around the path in case of spaces
iRC = oShell.Run("""" & sFilePath & """", 0, True)
' Return with the same errorlevel as the batch file had
Wscript.Quit iRC
@echo off
\\%LANSWEEPER ACTIONS SHARE%\owexec -nowait -k "wscript.exe" -p "\\%LANSWEEPER ACTIONS SHARE%\batchlauncher.vbs \\%LANSWEEPER ACTIONS SHARE%\getNetUse.bat" -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
)
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now