i am new to BF and want to create a fixlet to delete a folder in the registry.
Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run key
Find Logitech Download Assistant and delete the entry
thanks for the help
Adam
i am new to BF and want to create a fixlet to delete a folder in the registry.
Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run key
Find Logitech Download Assistant and delete the entry
thanks for the help
Adam
You should be able to make some kind of relevance like:
exists value âLogitech Download Assistantâ of keys âHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runâ of native registry
and then a command to delete it:
// For 32Bit
if {not x64 of operating system}
regdelete â[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]â "Logitech Download Assistant"
endif
// For 64Bit
if {x64 of operating system}
regdelete64 â[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]â "Logitech Download Assistant"
endif
Assuming âLogitech Download Assistantâ is the name of a value, there are a few considerations here.
Bigfix is a 32-bit application, and trying to access key "HKEY_LOCAL_MACHINE\Software" of registry
in relevance will actually be redirected to HKEY_LOCAL_MACHINE\Software\Wow6432Node
. This can be avoided by using the of native registry
or of x64 registry
inspectors instead.
When the Action runs, it likewise spans 32-bit binaries for actions like wait reg.exe
. This can be avoided by using action uses wow64 redirection false
in the script.
Try the following on a test system
Relevance:
windows of operating system AND (exists values "Logitech Download Assistant" of keys "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" of native registry
Action:
action uses wow64 redirection false
waithidden reg.exe delete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" /v "Logitech Download Assistant" /f
Iâd also recommend checking out the Windows Registry Wizard for such use cases as well: How to add value in registry
Do people prefer using the reg add/delete over the bigfix reg commands? I seem to make half my fixlets either way for some reason.
I usually prefer the reg.exe method, but them Iâm often usually deleting multiple keys at once.
I donât know of a method to specify a plural number of keys to delete via the native BigFix commands, but I can create an appendfile for multiple âreg.exeâ command lines via relevance.
action uses wow64 redirection false
delete __appendfile
appendfile {concatenation "%0d%0a" of ("reg.exe delete %22" & pathname of it & "%22 /F") of keys whose (value "DisplayName" of it as string contains "Applications I want to remove") of keys "HKLM\Software\Microsoft\Windows\Uninstall" of native registry}
move __appendfile deletereg.cmd
waithidden cmd.exe /c deletereg.cmd
As Iâm using that method so frequently, I generally use the âreg.exeâ command even where I donât necessarily need it.
There is a side-effect if you have a huge number of fixlets doing this in a baseline though. Each callout to wait
or waithidden
has some delay, the action script doesnât immediately know when the command has finished; it may take fifteen or thirty seconds before moving on to the next line of actionscript.