Rename "Comodo Internet Security-old" from Comodo Security Folder

Hi,

This Script is used to rename C:\Program Files\COMODO\Comodo Internet Security-old to its appropriate folder name C:\Program Files\COMODO\Comodo Internet Security.


import os
import ctypes
import shutil
class disable_file_system_redirection:
    _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
    _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
    def __enter__(self):
        self.old_value = ctypes.c_long()
        self.success = self._disable(ctypes.byref(self.old_value))
    def __exit__(self, type, value, traceback):
        if self.success:
            self._revert(self.old_value)

Dir_old="C:\Program Files\Comodo\Comodo Internet Security-old"
Dir_new="C:\Program Files\Comodo\Comodo Internet Security"
with disable_file_system_redirection():
    if os.path.isdir(Dir_old):
        os.rename(Dir_old,Dir_new)
        print "Renamed successfully...."       
    else:
        print "Folder not exists..."


rename-comodo-internet-security-old-from-comodo-security-folder.json (1.33 KB)

Hi @Saikiran
Presumably Comodo Internet Security-old will only be present on PCs where CCS is not running? Please confirm.

Presumably Comodo Internet Security-old will only be present on PCs where CCS is not running? Please confirm.

Hi @nct , Yes you are right. The issue was related to an error during updating of the client. which caused the installation folder to be renamed as -old but halted the installation of new folder. The issue was causing CCS to stop running. This is a remedy for that.

Thanks&Regards
AhmetEnes