-
So I know using commandline -l or --override and %LOCALAPPDATA% gets me what I need, but trying to include a non-admin install option in the manifest itself. I can't track down any documentation on using runtime variables in the manifest itself. Only one that jumps out a lot is " I feel like this would be a common need and documented somewhere, but can't for the life of me track down the convention for the manifest for declaring %LOCALAPPDATA% paths (root, Programs, etc) in the manifest itself. If the item is marked Portable I believe it will get put into /Packages so that might be an option, but again feels like another workaround. 💯 it would be easier if the installer had a machine wide / current user install toggle, but in the case I am working on there isn't. I would think that winget might have some helpers for architecture program files as well, but it may push that back on the installer which I get. I can see the environment variables are used liberally in the codebase, but seems to be all internal and not usable by consumers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
(Edited your post so that The manifest entry for InstallLocation is not exactly meant to specify where a package should install. Rather, it is meant to let winget know how to tell the installer where to install. Then, when you use the You can see it documented at https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.0.0/installer.md#installlocation (you need to expand the text) There's also a token you can use in the manifest for the installer's log location, but I think that's the most support there is for any kind of runtime expansion of values in the manifest. This probably wouldn't fly in the winget-pkgs repo but in case you're doing this for a private manifest, I think you could specify an install location using the If you don't pass the |
Beta Was this translation helpful? Give feedback.
(Edited your post so that
<INSTALLPATH>
and<LCOALAPPDATA>
show correctly)The manifest entry for InstallLocation is not exactly meant to specify where a package should install. Rather, it is meant to let winget know how to tell the installer where to install. Then, when you use the
--location
argument, we pass that to the installer. So, for example, if in a manifest you setInstallLocation: /installTo <INSTALLPATH>
, then if you call winget withwinget install [your package] --location C:\Install\Here
, we would ultimately pass to the installer the arguments/installTo C:\Install\Here
You can see it documented at https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.0.…