/build/static/layout/Breadcrumb_cap_w.png

Using KACE K1000 Device Actions With Any Windows Browser

The Dell KACE K1000 Systems Management appliance offers the option to define custom device actions that will start a remote session or execute custom commands like ping etc. Most of these actions only work with Internet Explorer since they use ActiveX.


This article describes a custom solution that can launch the device actions from the most common browsers available for Microsoft Windows.

The download is available here Download, it is a KACE K1000 script (6.4 SP2) for Windows that can be imported into a K1000 appliance. Download the script and copy it to the clientdrop share of the K1000 and import it into the K1000. From there the script can be deployed to all the Windows computers from where the device action(s) shall be executed.

If a dedicated Remote Control Software like UltraVNC Viewer is required on those PCs that Software must be deployed separately. Built in commands like mstsc, ping etc. do not require a separate installation.


This is an example of a custom action for the UltraVNC Viewer in the K1000:

K1000DeviceAction://C:/Program Files (x86)/uvnc bvba/UltraVNC/vncviewer@exe@KACE_HOST_IP


K1000DeviceAction:// is a pseudo protocol being created by the script on the computers the script gets deployed to. It makes the browser accept custom commands since it simulates a custom protocol.

C:/Program Files (x86)/uvnc bvba/UltraVNC/vncviewer is the path to the UltraVNC Viewer including the filename of the file to execute without the extension .exe. Make sure to use / instead of \ in the path, otherwise the action will not work.

exe is the Extension of the file to execute

KACE_HOST_IP is a K1000 device action variable for the remote computer's IP address

@ is a separation character allowing the script to generate the command(s) to execute.


The common pattern for the action is: K1000DeviceAction://Path/FileToExecute@FileType@Parameter(s),  any other device action can be created using this pattern.

An action running a ping looks like this: K1000DeviceAction://cmd@exe@"/k ping KACE_HOST_IP"

Opening a Windows Explorer showing the content of C$ on a remote computer can be done using: K1000DeviceAction://cmd@exe@"/k net use \\KACE_HOST_IP\c$ && explorer \\KACE_HOST_IP\c$"

Whenever more than 1 parameter  is required for the device action like in the example above, make sure to include the parameters in quotation marks:

"/k net use \\KACE_HOST_IP\c$ && explorer \\KACE_HOST_IP\c$"

In the example above I have only used explorer but not explorer.exe, because otherwise the K1000 Website will return en error. There seems to be a hardcoded check for .exe in the K1000.


On the computers where the device action shall be executed popups must be allowed for the K1000 Website in the browser settings.

The solution has been tested with Windows 7, 8, 8.1 and 10 running MS Internet Explorer, Microsoft Edge, Google Chrome and Firefox.


Here are some screenshots showing how it looks like running the action from  Microsoft Edge:

    






NOTE: This is a custom solution that is not officially supported by Dell Software Support !



Comments

  • Great solution! - chrpetri 4 years ago
  • I send that. Happy to see that there is at least a way to do it in other browsers! - MAXintosh 4 years ago
  • For Teamviewer:
    K1000DeviceAction://C:/Program Files (x86)/teamviewer/teamviewer@exe@"-i KACE_CUSTOM_INVENTORY_TEAMVIEWERID"

    For RDP:
    K1000DeviceAction://mstsc@exe@/v:KACE_HOST_IP - brucegoose03 4 years ago
  • Firefox doesn't know how to open this address, because one of the following protocols (k1000deviceaction) isn't associated with any program or is not allowed in this context.

    You might need to install other software to open this address.



    Tried to open RDP frpm firefox

    k1000deviceaction://mstsc@exe@/v:10.100.32.100 - rahimpal 4 years ago
  • Did you download and install the script mentioned in the article? - UntchV 4 years ago
  • For other readers that haven't used it before and are scratching their heads trying to find it, here is where the import tool is.

    Settings > Resources > Import > Choose action drop-down > Import from Network Share. - designworks 4 years ago
  • I would like to create an action for PowerShell that prompts for admin credentials before executing PowerShell and then runs "enter-pssession KACE_HOST_IP". But I'm not sure how to get the prompt for elevated privileges. Does anyone here know?

    This is probably cause for its own question but I have got this working from a command prompt.
    "runas /user:domain\user "powershell -noexit -command {enter-pssession machinename}"
    but it doesn't actually enter into a pssession like it should.
    If I execute
    "powershell -noexit -command {enter-pssession dtw00108}"
    from an elevated command prompt it does what I want it to. Open a new PowerShell window in a remote session.
    And worse still, if I try and put either command into my K1000 as a custom action it bitches about the action only being able to executed with Internet Explorer for the former (??) and does nothing for the latter of the two.

    Any ideas fellas? - designworks 4 years ago
  • I think I'm having trouble with actions that require " (quotes) in the command arguments. Does anyone know how to escape them so this works? - designworks 4 years ago
  • After recently upgrading to K1000 v7.0 the script did not work anymore.
    Seems as if the v7.0 agent does not provide the variables like %KACE_OS_ARCH% anymore.

    I fixed it by replacing the inline Batch-script with this:

    If Not Exist "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" md "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction"
    IF DEFINED PROGRAMFILES(x86) (copy "%~dp0k1000_deviceaction_X64.exe" "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" /Y) ELSE ( copy "%~dp0k1000_deviceaction_X86.exe" "%ALLUSERSPROFILE%\Dell\K1000_DeviceAction" /Y)
    REG ADD HKCR\K1000DeviceAction /f
    REG ADD HKCR\K1000DeviceAction /t REG_SZ /d "K1000 Device Action Protocol" /f
    REG ADD HKCR\K1000DeviceAction /v "URL Protocol" /t REG_SZ /f
    REG ADD HKCR\K1000DeviceAction\DefaultIcon /d %WINDIR%\System32\mstsc.exe /t REG_SZ /f
    REG ADD HKCR\K1000DeviceAction\Shell /f
    REG ADD HKCR\K1000DeviceAction\shell\open /f
    IF DEFINED PROGRAMFILES(x86) (REG ADD HKCR\K1000DeviceAction\shell\open\command /t REG_SZ /d """"%ALLUSERSPROFILE%\Dell\K1000_DeviceAction\K1000_deviceaction_X64.exe""" """%%1"" /f) ELSE (REG ADD HKCR\K1000DeviceAction\shell\open\command /t REG_SZ /d """"%ALLUSERSPROFILE%\Dell\K1000_DeviceAction\K1000_deviceaction_X86.exe""" """%%1"" /f) - chrpetri 4 years ago
    • Hey chrpetri, I'm having a bump is attempting your solution. Everything looks good, but it only opens up a blank page in Chrome Tab. I was wondering If I could pick your brain for some assistance. - DaveMT 3 years ago
    • We recently upgraded our K1000 to V7 also and found the same problem.

      I will try this script and report back.

      UPDATE: Bingo! Working! Thanks!! - designworks 3 years ago
  • @designworks, did you try to escape the additional double quotes with another double qoute like this:
    "runas /user:domain\user ""powershell -noexit -command {enter-pssession machinename}"""
    ? - chrpetri 4 years ago
  • @designworks We run IE as admin to begin with. This way anything it spawns runs under the same admin account. I got mine working using:

    powershell.exe -noexit Enter-PSSession -ComputerName KACE_HOST_NAME

    Im in a multi domain forest and would much prefer using KACE_HOST_IP but cannot get this to work atm. Looks like a WinRM issue though and not a KACE one. - tOBdavian 4 years ago
  • This is working great with Chrome, especially with the changes suggested by @chrpetri. My only issue is that it opens up a new tab for each action. Any way to get those tabs to auto-close once the action is complete/started? - Teknosha 4 years ago
    • Were you able to find a way to close the open blank tab? - jeremyrileysmith 3 years ago
    • I tried and I am not having much luck. Did you do anything different other than setting up the batch file and configuring the Device Actions?

      I don't get any errors, and it opens the blank tab, but nothing happens beyond that. - DaveMT 3 years ago
      • Did you run the batch at least once on every machine that shall be able to run the configured actions?
        Please post your action string here so we can check whats wrong. :) - chrpetri 3 years ago
    • Unfortunately I could not find a solution to avoid this either yet... - chrpetri 3 years ago
  • We set this up today, and it works great! Thanks for all the info, guys!

    The commands we used for Goverlan Remote Control are listed below.

    Goverlan RC-Internal:
    K1000DeviceAction://C:/Program Files/Goverlan Reach Console 9/GoverRMC@exe@KACE_HOST_IP

    Goverlan RC-External:
    K1000DeviceAction://C:/Program Files/Goverlan Reach Console 9/GoverRMC@exe@REACH: KACE_HOST_IP - khaslbauer 3 years ago
    • Can you tell me what version you are running? after running that script, the machine action just opens a new tab then closes it quickly. - bmaheu 3 years ago
      • Running 7.1.149. If you're running 7.x, make sure you edit the script per chrpetri's post above, and run it again. It wont' work without those updates. Once you've run the script against the machine you want to run the actions from, you should be in good shape. - khaslbauer 3 years ago
  • Has anyone had any luck with this using IE 11 on Win10? I've updated the script per chrpetri's comment, however every time I try and run a device command IE pops up and says "You'll need a new app to open this K1000DeviceAction"

    Pretty certain my activex settings for the trusted site are correct...... - mtopo 3 years ago
    • My IE11 on WinX 1607 runs the K1000DeviceAction URLs (just had to approve this once in a checkbox dialog).
      Something might be wrong in the HKEY_CLASSES_ROOT\K1000DeviceAction\ registry key on your machine that is trying to run the commands. I get the error message you mentioned when the key is not present (or named differently). - chrpetri 3 years ago
  • Has anyone tried this for V8+ yet? I'm also curious if the source for device action exe is available anywhere? - infinite_e 2 years ago
  • I am testing on V8. Script did not work, but I am sure that is because I did not update the vars in the script.. I just ran everything manually so I could test the functionality. The .exe itself is no longer working for me. I am on Windows 10 x64. I have downloaded Autoit v3 for troubleshooting, but honestly I am not that versed in autoit scripting..

    Getting an error, "Array variable has incorrect number of subscripts or subscript dimension range exceeded" - kmccully 2 years ago
  • Anyone test this on v10 yet? Looks like this is still a needed feature and one that was advertised to us during out demo of SMA 9 a year ago... - JS_DC 1 year ago
    • I'm still running this setup on v10.1.99 currently without any problems - chrpetri 1 year ago
      • Got it working on v10.0! Was just missing the part about Settings | General Settings | Device Actions | Add New Action - JS_DC 1 year ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ