(imported comment written by sjsueztech)
Greetings Eveyrone,
I was able to get my fonts installed, finally, with no issues. Originally I had a VM over NAT, so I am thinking that was causing issues. Now I am trying to remove them, since the fonts we are using have been developed by our organization and must be used only in certain scenarios. Thus, I needed to write a fixlet to remove them, just in case that is required. Below is the code I am using along with results:
if {exist file "C:\Windows\\Fonts\<fontfilename>"}
dos del "{pathname of windows folder}\Fonts\<fontfilename>"
elseif {exist file "C:\Windows\\Fonts\<fontfilename>"}
dos del "{pathname of windows folder}\Fonts\<fontfilename>"
else {exist file "C:\Windows\Fonts\<fontfilename>"}
dos del "{pathname of windows folder}\Fonts\<fontfilename>"
endif
I may be able to use a loop for this, but I don’t know how to do that yet.
I double-checked the action script using fixlet debugger in the “Actions” tab. It runs successfully and actually removes the font I specify. Although, when I actually deploy this fixlet, everything runs completely, but doesn’t actually remove the fonts. I set the criteria as follows:
Success Criteria
This action will be considered successful when it runs to completion.
Relevance Check is as follows:
(exist files("";"") of folder “Fonts” of Windows Folder)
I have a lot more fonts we are using, but I only show 2 for post readability.
I checked the “Show Action Info” by right-clicking the computer name and all the action script code executes completely, but when I use a command prompt to find the fonts the fixlet is suppose to delete, I can see all of the fonts.
If I set a custom success criteria where the relevance check written above is checked to be false, the fixlet stays in the “Waiting” state even though all of the action script executed completely.
I also tried using the following code, but no luck, it actually fails on the first line. I tried tweaking it, but still no go:
if {exist file “C:\Windows\Fonts<fontfilename>”}
delete "C:\Windows\Fonts<fontfilename>"
elseif {exist file “C:\Windows\Fonts<fontfilename>”}
delete "C:\Windows\Fonts<fontfilename>"
else {exist file “C:\Windows\Fonts<fontfilename>”}
delete "C:\Windows\Fonts<fontfilename>"
endif
It is weird that I can run the command using fixlet debugger manually on one of the fonts and it works, but even though each line of code completes, the fonts are NOT deleted using the fixlet. I know I am probably missing something.
I failed to mention that, it looks like the relevance language is working, since the fixlet state is staying in a “waiting” state, since the fonts are not actually deleted.
Any ideas?