Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("C:\Users\Public\Desktop\E-ME.lnk") Then
fso.DeleteFile("C:\Users\Public\Desktop\E-ME.lnk")
Else WScript.Quit
End If
It has to be run with proper command . You can test it in elevated command prompt.
Working locally does not mean a lot, you need to test deployment too. After some experiments I discovered You have to modify Command line adding cscript, dont know what SCCM do behind scene but this line works.
I deployed it as another deployment to the same collection. You can put it together in one package but if you have no previous versions, you dont need to remove link.
Nav komentāru:
Ierakstīt komentāru