' Quita el agente del inicio automático de Windows.

Option Explicit

Dim fso, shell, startupFolder, shortcutPath

Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")

startupFolder = shell.SpecialFolders("Startup")
shortcutPath = startupFolder & "\Egurrola Print Agent.lnk"

If fso.FileExists(shortcutPath) Then
    fso.DeleteFile shortcutPath, True
    MsgBox "Inicio automático desinstalado.", vbInformation, "Egurrola Print Agent"
Else
    MsgBox "No había acceso directo en inicio de Windows.", vbExclamation, "Egurrola Print Agent"
End If
