Solved Deleting file in C:\program files\.. by batch file?


unsorted42

Member
Local time
6:57 AM
Posts
50
OS
Windows 11 Pro
Every time acrobat reader updates on my pc it recreates an unneeded file which generates an error when I close a pdf. The recommended solution is to delete that particular file (AdobeCollabSync.exe). Whilst it is easy enough to open up C:\Program Files\Adobe\Acrobat DC\Acrobat and manually delete the file I would like to create a bat file to simplify this process.

Any suggestions as to what I need to put into the bat file in order to be able to get past the 'access is denied' result? Running the command prompt in admin mode gives an access denied message. Changing to the actual folder (command prompt) and trying to delete from there I get a "file not found' error, even tho' it is clearly showing up in file explorer. I've also tried making a bat file with "del ..", creating a shortcut to that and running the shortcut as admin.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS
This is what I would try:
Go to that folder, create an empty text document, save it, with the exe extension, so it's no longer a text file, like so:
AdobeCollabSync.exe
(that being an empty text document which is 0 KB big.)
Right click that file -> Properties -> Security tab
Press Edit. Then for each entry there: , check all the checkboxes under Deny, and press OK and press OK again.
(Be aware that this makes it were you cannot rename/delete/etc that file. But this also disallows your computer, in any way, to modify that file.)
It should stay as a 0 KB big file.

Try this method, and see if the bug is stops. If it doesn't stop, then "Allow" all the checkboxes you Denied earlier, and delete that file.

We would then need to approach this issue a different way.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Built
Any suggestions as to what I need to put into the bat file in order to be able to get past the 'access is denied' result?

If you really needed to you could create a bat fle using this:

- note the create bat file option part way down.

But be very very careful.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo t480s
    CPU
    i7-8650U
    Memory
    16GB
    Graphics Card(s)
    Intel UHD 620
    Screen Resolution
    1920x1080
    Hard Drives
    C SN810 SDCPNRY-512G-1006
    Browser
    Edge, Firefox
    Antivirus
    Defender
Pepanee ... Wouldn't that generate errors when acrobat updates and can't replace the file?
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS
Pepanee ... Wouldn't that generate errors when acrobat updates and can't replace the file?
That is a possibility. Assuming Acrobat updates, and you get an error during updating, you still have the ability to repair the app if it gets corrupt. But before doing so, you'd reset the permissions of that empty file back to Allowed for every entry, and Acrobat would fix that.
Then let the app update, then do that same idea until it fails in its next auto update.
I'd play around with that and see if it suits you.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Built
dalchina .. thanks! I already had power run for something else so I tested it on a copy of the offending file in C:\program files\0\ and it cleanly removed the offending file and nothing else. I then used it to create a bat file to delete the file from the adobe prog folder and that worked like a charm .. and just deleted the file I wanted deleted, so problem solved.

pepanee ... your idea would work, but it looks to be more work than the method I was using which was opening up the folder and deleting it via file explorer every time there was an update (which seems quite often these days). Dalchina's suggestion allows me to reduce the needed action to just running the Powerrun generated bat file whenever acrobat updates, which is the ideal solution I was after. :)
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS
Another solution, which doesn't require you to check for recent Adobe updates (or even block them) is to use IFEO to prevent a program from running. In this case, every time AdobeCollabSync.exe is called, Windows runs rundll32.exe instead (which does nothing).

Adobe can update the original file as much as it wants, and no permissions need to be changed. IFEO works at the system level to trap program file execution.

Code:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AdobeCollabSync.exe" /v "Debugger" /t REG_SZ /d "rundll32.exe" /f

To remove the block:
Code:
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AdobeCollabSync.exe"
 

My Computer

System One

  • OS
    Windows 7

Latest Support Threads

Back
Top Bottom