Open DrewNaylor opened 3 years ago
Maybe it wouldn't even need to save the batch script and could just create one in memory. Would that cause memory issues with a 32-bit process? Not sure, but I want to move to 64-bit-only someday and not every modern system supports x86_64 stuff, like Windows on ARM did until a preview a few months ago or something. Could always offer anycpu builds alongside 64-bit builds.
Turns out the maximum length is 8,191 characters: https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation
Preferably there would be a thing that splits the command automatically, but I don't know how to do that. For now this would be the main way to do it. Probably should have this check the Registry key for the max command length if it exists, so that it uses what's really set rather than requiring changing it in the config file or the Options window. Could also add a button to both the File menu and the Apply Changes window that exports a batch script of the packages to install/upgrade/uninstall. This button would be added after the checkboxes are replaced by a More... linklabel that opens a small window with the options related to Apply Changes. In the File menu, it'd be like "Export>Batch script from current session selections" and "Export>Installed apps via winget".