When I run a script instead of saying fixed it says its not relevant

Relevance: exists FILE “C:\Users\Public\Desktop\Sun Life Shortcuts\Service Desk.lnk”

Action:

delete makeshortcut.vbs
delete shortcut.vbs
dos CMD /C Del “C:\Users\Public\Desktop\Sun Life Shortcuts\Service Desk.lnk” /F /Q

if {not exists folder “C:\helpdesk”}

dos md C:\helpdesk

endif

if {not exists file “C:\Helpdesk\Icons\HelpDesk.ico”}

prefetch f4b14653b3949d7d186bafef43ce12c099f61c5a sha1:f4b14653b3949d7d186bafef43ce12c099f61c5a size:93929 http://EDITED/Uploads/f4b14653b3949d7d186bafef43ce12c099f61c5a/HelpDesk.ico.tmp sha256:3f6e3637d679903bea771a84cbed0e846e94487ed3aa743b365de72345759ff2
extract f4b14653b3949d7d186bafef43ce12c099f61c5a C:\Helpdesk\Icons

endif

if {exists folder “C:\Users\Public\Desktop\Sun Life Shortcuts”}

appendfile SET WshShell = WScript.CreateObject(“WScript.Shell”)
appendfile strshortcut = "C:\Users\Public\Desktop\Sun Life Shortcuts\Service_Desk.lnk"
appendfile Set oUrlLink = WshShell.CreateShortcut(strshortcut)
appendfile oUrlLink.TargetPath = "https://slfhc.sdpondemand.manageengine.com/"
appendfile oUrlLink.IconLocation = "C:\helpdesk\HelpDesk.ico"
appendfile oUrlLink.Save
move __appendfile shortcut.vbs

else

appendfile SET WshShell = WScript.CreateObject(“WScript.Shell”)
appendfile strshortcut = "c:\Users\Public\Desktop\Service Desk.lnk"
appendfile Set oUrlLink = WshShell.CreateShortcut(strshortcut)
appendfile oUrlLink.TargetPath = "https://slfhc.sdpondemand.manageengine.com/"
appendfile oUrlLink.IconLocation = "C:\helpdesk\HelpDesk.ico"
appendfile oUrlLink.Save
move __appendfile shortcut.vbs

endif

waithidden cmd /c cscript shortcut.vbs

So I have another script with the same information except the file is in a different location. That one reports as fixed. This one just reports as not being relevant after being run. Can someone help?

Try the relevance on the machine that is returning “Not Relevant” - i.e. is the file actually there?

If it is, another thing it may be - check the End time of your job. If it past already on the machine it will automatically mark it as Not Relevant because it considers it that it can never happen since it’s “Expired”.

1 Like

When I checked the computer that was reporting as non-relevant the file was missing as it had already performed the action. The time had not passed when I tried running the script. It is past the time now though.

So…there’s no problem, then? If the file is not present, and your Relevance is based on the file existing, the action result should be ‘Not Relevant’…

There is no problem with the script. The issue was that after running the script instead of saying “Fixed” It would say “Not Relevant” I fixed it by reinstalling the BigFix console.

This is one of the ways Fixlets can differ from Tasks.

If you are validating the endstate and want relevance & actions to reflect correctly, you would want to use a Fixlet.

1 Like