.実際には、同じコンピューターに異なるバージョンのソフトウェアをインストールしたので、ユーザーが 3 番目のバージョンのインストールに進むときに、両方のバージョンのフォルダーを確認したいと考えています。ループを使用しようとしていますが、インストーラーが機能していません。よろしくお願いします。
同じコンピューターに同じソフトウェアの 2 つのバージョンが既にインストールされています。3 番目のバージョンをインストールするときに、スクリプトがパスをチェックし、以前の 2 つのバージョンが既にインストールされている同じパスにユーザーがインストールできないようにする必要があります。
Function .onVerifyInstDir
nsArray::Set array 1.6
nsArray::Set array 1.7
nsArray::Set array 1.8
nsArray::Length array
Pop $R0
;DetailPrint `array length: $R0`
StrCpy $R1 0
${DoWhile} $R1 < $R0
nsArray::Get array $R1
Pop $R2
StrCpy $tempregistry "$(^Name)_$R2"
;DetailPrint `MyArray2[$R1] is $R2`
ReadRegStr $path HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstal\$tempregistry""InstallLocation" ;fetching installed location
${If} $path == ""
${Else}
strCmp $path $INSTDIR 0 pathGood
;Abort
IntOp $R1 $R1 + 1
${EndIf}
${Loop}
PathGood:
FunctionEnd