I am trying to make a package, which deletes Windows 7 temporary profiles in the registry.
I use this command to get the the users SID:
Code: Alles auswählen
Set $SIDcmd$ = getOutStreamFromSection ('DosInAnIcon_getuser')
Set $SID$ = takeFirstStringContaining($SIDcmd$,"S-")
[DosInAnIcon_getuser]
wmic useraccount where name='$UserProfileName$' get sid
Code: Alles auswählen
S-1-5-21-299502267-1647877149-1417001333-39507
Code: Alles auswählen
[Registry_install]
[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$SID$.bak]
Code: Alles auswählen
S-1-5-21-299502267-1647877149-1417001333-39507 .bak
Regards