This shows you the differences between two versions of the page.
userspace:diskpart_-_dynamic_system_partition_resize [2015/09/17 17:07] larsg created |
userspace:diskpart_-_dynamic_system_partition_resize [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Resize system partition dynamically, | ||
- | * created by LarsG [[algee2005@gmail.com]] 2015/09/17 | ||
- | |||
- | * tested under windows 7 | ||
- | * tested under winst 4.11.5.13 | ||
- | |||
- | In case you want your system partition to only use the amount of diskspace required by the applications you install, | ||
- | you can use the following code to extend your system partition dynamically before installing your software. | ||
- | |||
- | Integrate the following code into your installation script, and change the value of $MinimumFreeSpace$ to the amount of MB required by the software to install. | ||
- | |||
- | !!! Warning !!! | ||
- | |||
- | This can lead to problems if your applications or users are storing data on the system partition. | ||
- | If you use this, you should adopt further measures to prevent possible hickups - | ||
- | f.e. move profiles to another partition, configure your applications to store their data on another partition, prevent write access for users on the system partition. | ||
- | take care ;) | ||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | defVar $MinimumFreeSpace$ | ||
- | set $MinimumFreeSpace$ = " | ||
- | |||
- | if not ( hasMinimumSpace( " | ||
- | execwith_resize diskpart /s | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | [execwith_resize] | ||
- | SELECT volume %SystemDrive% | ||
- | EXTEND size=$MinimumFreeSpace$ | ||
- | </ |