Unable to delete file C:\Windows\System32\GroupPolicy\Machine\Registry.pol

Hi,

I create a task with the following command to delete the captioned file on windows 10 PC but the file is still there after the task has been completed.

delete C:\Windows\System32\GroupPolicy\Machine\Registry.pol

I confirm the file "Registry.pol" is under C:\Windows\System32\GroupPolicy\Machine\

The following error message is extracted from the log

At 11:13:54 +0800 -
Report posted successfully
At 11:13:55 +0800 - mailboxsite (http://redacted:52311/cgi-bin/bfgather.exe/mailboxsite1618812708)
Relevant - Delete Registry.pol (fixlet:505820)
At 11:13:55 +0800 -
ActionLogMessage: (action:505820) Action signature verified for Execution
ActionLogMessage: (action:505820) starting action
At 11:13:56 +0800 - actionsite (http://redacted:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded delete No 'C:\Windows\System32\GroupPolicy\Machine\Registry.pol' exists to delete, no failure reported (action:505820)
At 11:13:56 +0800 -
ActionLogMessage: (action:505820) ending action
At 11:13:56 +0800 - mailboxsite (http://redacted:52311/cgi-bin/bfgather.exe/mailboxsite1618812708)
Not Relevant - Delete Registry.pol (fixlet:505820)
At 11:14:26 +0800 -
Full Report posted successfully

Hello!

Likely the issue here is Wow64 redirection. Please see Tip: Troubleshooting ActionScript Command Lines (Windows) for reference, but you’ll likely need to add the following line to the beginning of your actionscript:

action uses wow64 redirection false

2 Likes

delete “C:\Windows\System32\GroupPolicy\Machine\Registry.pol”
Quotation was missing

It’s the same

delete “C:\Windows\System32\GroupPolicy\Machine\Registry.pol”

Hello, it woks. Thank you for your help. Is it necessary to resume the redirection to true when finished?

action uses wow64 redirection false
delete "C:\Windows\system32\GroupPolicy\Machine\Registry.pol"
1 Like

The state only continues until the action gets completed. Hence there is no need to change it back to true. Its only redirecting to native 64-bit System32 directory.

1 Like

Thank you for your help