Jump to content
Dennis Cox

Delete Desktop Short Cut

Recommended Posts

My predecessor had created a script that would install a desktop link to our help desk. We no longer use this solution and I want to have the shortcut removed from every device. I can't seem to find a script to do this. I hope someone could help.


This is the script that he had used:
@echo off
md C:\icon
copy "\\edmws001\image\Nortrux_Helpdesk_icon.ico" "c:\icon"
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant Administrators:F
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant Users:F
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant INTERACTIVE:F
attrib -R  "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk"
copy "\\edmws001\image\Nortrux IT Help Desk.lnk" "C:\Users\Public\Desktop"
attrib +R  "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk"
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant Users:R
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant Administrators:R
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant INTERACTIVE:R
icacls "C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk" /inheritance:r /grant SYSTEM:F

Share this post


Link to post
Share on other sites

Hello Dennis,

You can remove the link from numerous machines at the same time by creating a script containing the below line and executing it on the desired scope of machines using task.

Remove-Item 'C:\Users\Public\Desktop\Nortrux IT Help Desk.lnk' -force

For more information on the subject of creating and running scripts through Pulseway, please click here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Quenten Grasso
      Hey Guys,
      It would be great if we had some integration with https://chocolatey.org for windows package management, its basically like apt-get or yum for windows which seems a lot better IMHO then ninite type solutions. 
      Having its own tab under group policy for example to install selected apps across multiple machines and keep them updated within patch windows for example. This would be a huge benefit for Pulseway if done well.
      https://chocolatey.org/about
      https://chocolatey.org/pricing at only $3/year per machine its pretty competitive pricing.
      Cheers,
      Quenten
    • By Quenten Grasso
      Hey Fellow PW users,
      I've created a script which allows the system to change its name to %computername%-Current logged on username, which makes life a little easier when trying to remote to their computers on the remote control tool/Webapp.
      To get started, create your script in the script editor, in my example,
      Name: Update Computer Name with Logged on Username
      Windows/Powershell Code: 
      $pwqusers = quser | Select-Object -skip 1 $pwquserfmt = $pwqusers.substring(1,22).Trim() -join "," Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$env:computername-$pwquserfmt" Click Save.
      Next we create at new task,
      Name: Update Computer Name with Logged on Username
      Current Scope -> Windows Workstations
      Enable Scheduling -> (I've set it to run once a day) Every weekday (Monday to Friday), starting on 12 August 2018 at 09:00 (Australia/Brisbane)
      Scripts tab, Select/add your new script you just created and once that's done click save.
      You can now run the task on demand as well which will update all of the PC's in your windows workstations scope to Computer Name-Logged on usernames
      This works for RDSH hosts as well however it could get a bit of out hand if you have 5-10+ users logged in so I probably wouldn't recommend it to be used on servers.
      I Hope this helps you somehow, these scripts/suggestions come with no warranty and I bear no responsibility if this breaks anything, use at your own risk etc..etc..
      Cheers,
      Quenten
    • By Martin Stevnhoved
      Hi.
       
      I am making an Automation Script that updates a custom plugin-file, that might is always be in use, to a newer version.
      If the plugin doesn't already exist everything works fine.
      But if it already exist it cannot be overwritten, because the Pulseway Service (and managers, if any are running) is using the file.
      My solution is to stop the service, overwrite the file and start the service.
      It works very well when executing manually in ISE, but not when executed as an Automation Script from Pulseway.
      It looks like the entire script is terminated when the service stops, and the execution doesn't return anything in execution history - not even an error.
       
      Could anyone help me with the best practice for updating a plugin dll-file from an Automation Script.
       
      Best Regards,
      Martin Stevnhoved
    • By ArrowNM
      Will be able to see in the next release an option to update time on a bulk action for multiple tickets?

    • By Keith
      I am trying to create a PowerShell script that will run DBCC checks on a SQL server and then report status back to Pulseway.  I have a working script that I can run from the command line but the script will not run correctly when sent as a Pulseway script.  Here are the details.
      The script fails because it is unable to authenticate to the SQL server.  The SQL Server is running on the same machine as I am running the script on.  Thus wil are not dealing with cross machine accounts.  I have put debug code into the script and the account reported back by PowerShell is MACHINENAME$.  The machine is in a domain and thus the script appears to be reporting back the machine account in the domain.  This implies to me that when Pulseway runs a script it is using the NT AUTHORITY\SYSTEM account and that the MACHINENAME$ account would then be used for any network access.  Is this correct?
      I have given SQL Server rights to NT AUTHORITY\SYSTEM as well as DOMAIN\MACHINENAME$ and NT AUTHORITY\LOCAL SERVICE.  Non of these rights appear to allow me to connect to SQL.  Has anyone ever written Powershell code for Pulseway and been able to connect to SQL Server?
      Any ideas, thoughts or details on the user contexts used by Pulseway would be helpful.
×