Option Explicit
Dim oFS
Dim oWsh
Dim oNetwork
Dim strUser
Set oWsh = CreateObject("WScript.Shell")
set oFS = WScript.CreateObject("Scripting.FileSystemObject")
Set oNetwork= CreateObject("Wscript.Network")
strUser = oNetwork.username
Dim icon1
icon1 = oWsh.SpecialFolders("Desktop") & "\CTI Softphone.lnk"
Dim icon2
icon2 = oWsh.SpecialFolders("Desktop") & "\Shortcut CTI Softphone.lnk"
Dim icon3
icon3 = oWsh.SpecialFolders("Desktop") & "\Agent Desktop.lnk"
Dim icon4
icon4 = oWsh.SpecialFolders("Desktop") & "\Shortcut to Agent Desktop.lnk"
Dim icon5
icon5 = oWsh.SpecialFolders("Desktop") & "\CTI Agent Desktop.lnk"
IF (oFS.FileExists(icon1)) then
oFS.deletefile (icon1)
End if
IF (oFS.FileExists(icon2)) then
oFS.deletefile (icon2)
End if
IF (oFS.FileExists(icon3)) then
oFS.deletefile (icon3)
End if
IF (oFS.FileExists(icon4)) then
oFS.deletefile (icon4)
End if
IF (oFS.FileExists(icon5)) then
oFS.deletefile (icon5)
End if
Set oFS = Nothing
WScript.Quit (0)
Do more with
@echo off
setlocal
set files="CTI Softphone.lnk" "Shortcut CTI Softphone.lnk" "Agent Desktop.lnk" "Shortcut to Agent Desktop.lnk" "CTI Agent Desktop.lnk"
for %%G in (%files%) do ECHO del /f /s /q "%allusersprofile%\..\%%~G"
pause
Premium Content
You need an Expert Office subscription to comment.Start Free Trial