Kaseya Community

Removing an old desktop icon creating a new one

  • Has anyone attempted this with the scritping tool in Kaseya? I have a need to do this and have attempted to do it with a delete and write statement. I have had zero success!

    Any help would be appreciated!


    Mike

    Legacy Forum Name: Removing an old desktop icon creating a new one,
    Legacy Posted By Username: Mike Mitschke
  • What's not working? If it's just a regular shortcut, write file and delete should work fine. If it's a special icon (My Computer, My Network Places, etc.) that's another story.

    Step 1 - Delete file whatever.lnk
    Step 2 - Write file anewshortcut.lnk

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: sequoya
  • That's the issue it's not a standard .lnk file. The target looks like this: "C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe" -c "Propriatary file name".

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Mike Mitschke
  • I suppose I could offer more information on this. The icon is stored in this directory: C:\Documents and Settings\Default User\Desktop. So everyone that logs into the box gets this icon. That just adds to my dilemma. I need to not only delete it from this location but all of the other users as well.

    I have tried using the Delete file Write file scripting tools but nothing. That's what brought me here.

    Mike

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Mike Mitschke
  • I have found that you can not use the [browse] option when uploading .lnk files to the kserver. When you do, it will attempt to upload the target of the .lnk file, and not the .lnk file itself.

    You need to manually enter the path to the .lnk file that you are uploading.

    I have a script that writes an lnk file to the desktop...

    i.e.
    Write File
    Parameter 1 : %ALLUSERSPROFILE%\Desktop\DraftView.lnk

    works great!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: myArch-man
  • Without looking too closely I guess you could try the old email trick of renaming the extension, sending the file, then renaming it back.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: syscal
  • As far as I know, then lnk file holds the properties and arguements to launch the executable.

    Probably what I'd do is set the script to run a shell command.

    ie.
    IF "User is logged in" THEN
    impersonate user
    run shell command "del c:\documents and settings\%username%\desktop\link.lnk"

    In a seperate script - so it doesn't run every time a user logs in.
    Copy up new .lnk file to c:\documents and settings\all users\desktop\link.lnk

    I'm not terribly familiar with Kaseya yet so you'll have to work with this I'm sure.

    If the file itself with a "lnk" extension doesn't work you can rename it, send it, and rename it back.

    There has to be an easier way than all this but without actually trying it I can only guess right now and hope that this gets you started.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: syscal