{"id":28483496,"url":"https://github.com/collapselauncher/innosetuplogparser","last_synced_at":"2025-09-09T01:39:54.273Z","repository":{"id":212790846,"uuid":"732321972","full_name":"CollapseLauncher/InnoSetupLogParser","owner":"CollapseLauncher","description":"Parse and modify the Inno Setup Log file (unins000.dat)","archived":false,"fork":false,"pushed_at":"2025-01-27T20:43:06.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T21:44:59.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CollapseLauncher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-16T09:39:19.000Z","updated_at":"2025-03-28T17:55:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ed1f9f6-ee2d-4391-bd84-b598552f458b","html_url":"https://github.com/CollapseLauncher/InnoSetupLogParser","commit_stats":null,"previous_names":["collapselauncher/innosetuplogparser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CollapseLauncher/InnoSetupLogParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CollapseLauncher%2FInnoSetupLogParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CollapseLauncher%2FInnoSetupLogParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CollapseLauncher%2FInnoSetupLogParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CollapseLauncher%2FInnoSetupLogParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CollapseLauncher","download_url":"https://codeload.github.com/CollapseLauncher/InnoSetupLogParser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CollapseLauncher%2FInnoSetupLogParser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274232033,"owners_count":25245856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-07T21:38:35.926Z","updated_at":"2025-09-09T01:39:54.264Z","avatar_url":"https://github.com/CollapseLauncher.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Inno Setup Log Parser.\n\nThe goal of this project is to port to C# the InnoSetup uninstall logs mechanism.\nThis project was initially created by [**preseverence**](https://github.com/preseverence/isulr) and has been modified to work with [**ApplyUpdate**](https://github.com/CollapseLauncher/ApplyUpdate) app used for managing installation and update for [**Collapse Launcher**](https://github.com/CollapseLauncher/Collapse) project with additional features being added.\n\n### Main features\n* Read InnoSetup `unins000.dat` file\n* Decoding all records, flags and data\n\n### Added features since the initial implementation\n* Modify and Save the changes back to InnoSetup `unins000.dat` file\n* Adding CRC check mechanism (However, this check can be skipped)\n\n### Limitations\n* Compiled code sections will be skipped\n\n### Basic Usage Examples\n#### Printing Uninstall Paths\n```C#\nusing Hi3Helper.EncTool.Parser.InnoUninstallerLog;\nusing LibISULR;\nusing LibISULR.Records;\nusing System;\n\nstring innoFile = \"path_to_unins000.dat\";\n\n// The CRC check can be skipped by setting the skipCrcCheck argument to true\nusing (InnoUninstLog innoLog = InnoUninstLog.Load(innoFile, skipCrcCheck: false))\n{\n    foreach (BaseRecord baseRecord in innoLog.Records)\n    {\n        switch (baseRecord.Type)\n        {\n            case RecordType.DeleteDirOrFiles:\n                DeleteDirOrFilesRecord deleteDirOrFilesRecord = (DeleteDirOrFilesRecord)baseRecord;\n                Console.WriteLine(deleteDirOrFilesRecord.Paths[0]);\n                break;\n            case RecordType.DeleteFile:\n                DeleteFileRecord deleteFileRecord = (DeleteFileRecord)baseRecord;\n                Console.WriteLine(deleteFileRecord.Paths[0]);\n                break;\n        }\n    }\n}\n```\n\n#### Modify the base paths in ``DeleteDirOrFiles`` and ``DeleteFile`` records\n```C#\nusing Hi3Helper.EncTool.Parser.InnoUninstallerLog;\nusing LibISULR;\nusing LibISULR.Flags;\nusing LibISULR.Records;\nusing System;\nusing System.IO;\n\nnamespace Test\n{\n    internal class Program\n    {\n        private static void ChangeBasePath\u003cTFlags\u003e(BaseRecord record, string from, string to)\n            where TFlags : Enum\n        {\n            // Cast the base record to BasePathListRecord\u003cTFlags\u003e\n            BasePathListRecord\u003cTFlags\u003e listPathRecord = (BasePathListRecord\u003cTFlags\u003e)record;\n\n            // Find the start index of the searched path from \"from\" argument\n            int indexOf = listPathRecord.Paths[0].IndexOf(from, StringComparison.InvariantCultureIgnoreCase);\n\n            // If the indexOf is \u003e -1 (found), then try slicing the start of the path based on \"from\" argument\n            if (indexOf \u003e -1)\n            {\n                // Slice the string to get the relative path (and trim \\\\ if necessary)\n                string sliced = listPathRecord.Paths[0].Substring(indexOf + from.Length).TrimStart('\\\\');\n\n                // Combine the sliced relative path with base path from \"to\" argument\n                listPathRecord.Paths[0] = Path.Combine(to, sliced);\n            }\n        }\n\n        static void Main(string[] args)\n        {\n            string innoFile = @\"C:\\Program Files\\Collapse Launcher\\unins000.dat\";\n\n            // The CRC check can be skipped by setting the skipCrcCheck argument to true\n            using (InnoUninstLog innoLog = InnoUninstLog.Load(innoFile))\n            {\n                // Enumerate the record as BaseRecord\n                foreach (BaseRecord baseRecord in innoLog.Records)\n                {\n                    switch (baseRecord.Type)\n                    {\n                        // Replace the base path for DeleteDirOrFiles type record\n                        case RecordType.DeleteDirOrFiles:\n                            // Use DeleteDirOrFilesFlags as TEnum for ChangeBasePath() method\n                            ChangeBasePath\u003cDeleteDirOrFilesFlags\u003e(baseRecord, @\"C:\\Program Files\", @\"D:\\Program Files\");\n                            break;\n                        // Replace the base path for DeleteFile type record\n                        case RecordType.DeleteFile:\n                            // Use DeleteFileFlags as TEnum for ChangeBasePath() method\n                            ChangeBasePath\u003cDeleteFileFlags\u003e(baseRecord, @\"C:\\Program Files\", @\"D:\\Program Files\");\n                            break;\n                    }\n                }\n\n                // Save the record\n                innoLog.Save(innoFile);\n            }\n        }\n    }\n}\n```\n\n## License\nThe initial license is using [The WTFPL License](https://github.com/CollapseLauncher/InnoSetupLogParser/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollapselauncher%2Finnosetuplogparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcollapselauncher%2Finnosetuplogparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollapselauncher%2Finnosetuplogparser/lists"}