cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ssleeper
Engaged Sweeper II
When launching custom actions that contain a website and an action parameter ({computer}, {smartname}, {ipaddress} for example) we receive an error when using Internet Explorer.
The requested page will load on a new tab but the following error appears on the lansweeper page.

Action:
https://www.google.com/#q={smartname}

Result:



Thoughts?
9 REPLIES 9
Hemoco
Lansweeper Alumni
There is no workaround for this at the moment. We would have to look at our code to see how tblAssets.Mac is being updated, as two of our machines (one with and one without a tblAssets.Mac entry) appear to have been scanned with the same scanning methods. Note that MAC addresses were scanned for both machines and stored in tblNetwork, but they weren't added to tblAssets.Mac.

We do not support making custom database changes, as these are very likely to cause issues or even break your Lansweeper installation.
ssleeper
Engaged Sweeper II
We currently use Active Scanning of our domain to pull in most of the data. We do have an IP Address Range scan that runs once a week to pick up the odd systems. What scanning method do you recommend to pull this data into the appropriate table.

As an alternative it appears that the MAC data is recorded somewhere for these assets since it appears on the devices Config-Network page. Would it be possible to copy this data from one table to the other to fully populate the needed info for this to work?
Hemoco
Lansweeper Alumni
Upon further testing, we noticed that the action below works for most, but not all, of our Windows computers. We checked with development and they indicate that the {mac} parameter will only work for Windows computers if the MAC address is stored in the tblAssets.Mac database field. Depending on which scanning method(s) you're using, this isn't always the case, which may explain the issues you are having.
{actionpath}linktest.vbs "https://www.google.com/#q={mac}"
ssleeper
Engaged Sweeper II
Using the same example as above I should get a google search for the devices mac address but it isn't passing the mac along with the request. Do you have any suggestions on what I could be doing wrong?

{actionpath}linktest.vbs https://www.google.com/#q={mac}

Hemoco
Lansweeper Alumni
This was the case in Lansweeper 4.2, but {mac} should work for all assets in Lansweeper 5.0.
ssleeper
Engaged Sweeper II
Unfortunately I have tried several times with the {mac} variable but it doesn't pass anything. I thought that I had read in previous posts that {mac} only worked on non-PC assets.
Hemoco
Lansweeper Alumni
You should be able to use {mac} to pass the asset's MAC address to a custom action. The MAC address will be formatted as follows: AA:AA:AA:AA:AA:AA
ssleeper
Engaged Sweeper II
Worked perfectly. Thanks!
Now if only I could pass {mac} into the URL I could give my technicians quick access to our Cisco WCS and they could link directly to an assets entry to get quick access to all sorts of fun info about our laptops on the wireless network.

Maybe? Please? 🙂
Hemoco
Lansweeper Alumni
Using custom actions to launch URLs is not officially supported. You may have better luck launching a VBS script and adding the URL as a parameter. I.e.:
- Create a VBS script called linktest.vbs that contains the following:
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute WScript.Arguments(0), "", "", "", 1

- Add the script to Program Files (x86)\Lansweeper\Actions on your Lansweeper server.
- Configure the custom action below in the Lansweeper web console under Configuration\Website Management\Asset Pages.
{actionpath}linktest.vbs "https://www.google.com/#q={smartname}"