userspace:windows_remove_temporary_profile
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| userspace:windows_remove_temporary_profile [2017/04/03 11:29] – bobzbobz | userspace:windows_remove_temporary_profile [2021/08/23 10:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Windows Remove Temporary Profiles ====== | ====== Windows Remove Temporary Profiles ====== | ||
| - | //Scripts and Guide by Soren Birk.// | + | //Scripts and guide by Soren Birk.// |
| - | This scripts checks for temporary profiles in the registry and deletes them, if found. | + | This scripts checks for temporary profiles in the registry and deletes them, if any found. |
| **Tested with:** | **Tested with:** | ||
| Line 12: | Line 12: | ||
| < | < | ||
| CLIENT_DATA | CLIENT_DATA | ||
| - | ├ registry.png | + | ├ registrylogo.png |
| └ once.ins | └ once.ins | ||
| + | </ | ||
| + | |||
| + | ==== once.ins ==== | ||
| + | <code winst> | ||
| + | ; Author Soren Birk | ||
| + | |||
| + | [Actions] | ||
| + | requiredWinstVersion >= " | ||
| + | |||
| + | DefVar $ProductId$ | ||
| + | DefVar $UserProfileName$ | ||
| + | DefVar $SID$ | ||
| + | DefStringList $SIDcmd$ | ||
| + | DefStringList $UserProfileNamesList$ | ||
| + | |||
| + | set $UserProfileNamesList$ = getOutStreamFromSection (' | ||
| + | |||
| + | ; ---------------------------------------------------------------- | ||
| + | ; - Please edit these values | ||
| + | ; ---------------------------------------------------------------- | ||
| + | Set $ProductId$ | ||
| + | ; ---------------------------------------------------------------- | ||
| + | comment "Show product logo" | ||
| + | ShowBitmap " | ||
| + | |||
| + | Message " | ||
| + | |||
| + | comment " | ||
| + | ChangeDirectory " | ||
| + | for %prof% in $UserProfileNamesList$ do sub_remove_bak | ||
| + | |||
| + | |||
| + | [DosInAnIcon_list_profiledir] | ||
| + | @echo off | ||
| + | dir " | ||
| + | |||
| + | [sub_remove_bak] | ||
| + | Set $UserProfileName$ = " | ||
| + | if not ($UserProfileName$ = "" | ||
| + | Set $SIDcmd$ = getOutStreamFromSection (' | ||
| + | Set $SID$ = trim(takeFirstStringContaining($SIDcmd$," | ||
| + | |||
| + | comment " | ||
| + | Registry_install | ||
| + | endif | ||
| + | |||
| + | [DosInAnIcon_getuser] | ||
| + | wmic useraccount where name=' | ||
| + | |||
| + | [Registry_install] | ||
| + | Deletekey [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$SID$.bak] | ||
| + | |||
| </ | </ | ||
userspace/windows_remove_temporary_profile.1491211758.txt.gz · Last modified: (external edit)
