cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
George
Engaged Sweeper
We have some users here who never seem to reboot their machines. I've requested everyone reboot and still only have around 50% of the machines on lansweeper.

Is there a way I can manually force the lsclient.exe to scan a machine without it having to be run from a logon script.

I've tried using the at and schtask commands on Windows XP but I cant seem to get it working so maybe there is an easier way??

btw cool product 🙂
{George}
5 REPLIES 5
George
Engaged Sweeper
Smikkell, What is the limit of PCs that lansweeper can scan? I'm running the below and triggering around 20 machines each time to be scanned however only around 3 seem to be updating unless I manually do them 1 by 1.

Is there a limit in lansweeper 1.5 that only scans X ammount of machines in a certain period?
{George}
George
Engaged Sweeper
Ok I figured out a nice easy way to do the scanning via schtasks for multiple computers without aload of hassle. Maybe I will try and write a web interface for this so its even easier...

Here is how i did it. For anyone else who ever comes accross this thread you might need to adapt the instructions.

Create a file called PCList.txt and place it in the root of the c:\ drive of the lansweeper machine. (In my case both MSSQL and Lsconsole run on the same machine but if you have a database server and lsconsole server run this from the machine hosting lsconsole).

Create a share called "bat" and place the following files in it:

(lansweeper.bat)
--------------------------------------------------------------------
echo Running PC Audit
\\servername\bat\lsclient.exe <lansweeper IP>
--------------------------------------------------------------------
This bat file contains the same info you would run from a logon script.

(l.bat)
--------------------------------------------------------------------
@Echo Off

for /F %%I in (c:\PCList.txt) do call startsweep.bat %%I
--------------------------------------------------------------------

(startsweep.bat)
--------------------------------------------------------------------
@echo off
set thisPC=%1
echo checking %thisPC%
schtasks /create /s %thisPC% /tr \\servername\bat\lansweeper.bat /sc once /st 14:15:01 /sd 04/07/2006 /tn RunPCAudit /ru DOMAINNAMEHERE\lsuser /rp LSUSERPASSHERE
--------------------------------------------------------------------


Then you should load up a command prompt, navigate using CD to the directory where the bat share is and type in "l"

This will then run the file l.bat which lists all the PCs from PCList.txt
Then it wil run startsweep.bat which runs the schtask command but picks up the PC names from PCList.txt

You should see an output similar to the below:

checking PCNAME
SUCCESS: The scheduled task "RunPCAudit" has successfully been created.
checking PCNAME2
SUCCESS: The scheduled task "RunPCAudit" has successfully been created.
checking PCNAME3
SUCCESS: The scheduled task "RunPCAudit" has successfully been created.
checking PCNAME4
ERROR: The network path was not found.

Note on this example PCNAME4 was turned off so the network path is not found. At the end of all this review the list for any PCs not found and then you can contact the users to reboot or try again another time.

Hope this helps someone!!

Of course some bits you will need to modify to reflect your organisation. Remeber to change things like the date and time in the task command 😉

Also do a test first with a few PCs. I found its good to allow around 40-60 seconds per machine when running the task. Maybe the PC timeout values can be changed but im not sure how.


🙂 🙂
{George}
Hemoco
Lansweeper Alumni
Maybe you can create a vbs script to remotely schedule the task on the computer, some googling will do the trick.
George
Engaged Sweeper
Hi Smikkel,

I've managed to get the schtasks running which is ok however I'm manually having to add the PC Names to my script and run them one by one. I've got about 200 machines to do.

schtasks /create /s PCNAMEHERE /tr \\MYSERVER\bat\lansweeper.bat /sc once /st 15:59:01 /sd 03/07/2006 /tn RunPCAudit /ru DOMAIN\lsuser /rp MYPASSFORLSUSER

The bat script simply contains the %logonserver%/lsclient.exe as per the docs.

Can you think of a an even quicker way?

Also the only problem with this is the logonname listed under lansweeper is not the actual username but the lsuser account. At the moment I don't think this is such a problem.
{George}
Hemoco
Lansweeper Alumni
Best way is to schedule a task in windows xp