I want to know how to use NSIS script to remove credential manager data.
Could somebody help me?
Could somebody help me?
System::Call 'advapi32::CredDelete(t "crednamehere", i 1, i0)'
!include LogicLib.nsh
Section
System::Call 'ADVAPI32::CredEnumerate(t "user*", i0, *i0r1, *p0r2)i.r0'
${If} $0 <> 0
${IfThen} $1 U> 0 ${|} IntOp $1 $1 - 1 ${|}
${ForEach} $3 0 $1 + 1
IntOp $4 $3 * ${NSIS_PTR_SIZE}
System::Call '*$2(&i$4, p.r4)'
System::Call '*$4(i, i.r5, p.r6)'
System::Call 'ADVAPI32::CredDelete(t)(pr6, ir5, i0)'
${Next}
System::Call 'ADVAPI32::CredFree(pr2)'
${EndIf}
SectionEnd
Comment