I have this code:
`$scriptDetection = @’
aremplacer
‘@
$test=”$Str_path=”HKLM:SOFTWAREMicrosoftWindowsCurrent1.0 (v3)Uninstall!Test1.0_Frv3"
If (test-path $Str_path) {
If ((get-itemproperty -Path $Str_path).display1.0 (v3) -ieq “1.0 (v3)") {return $true}
}”
$scriptDetection = $scriptdetection -replace “aremplacer”, [regex]::escape($test)`
As there is a lot of , ‘ , “” and (), how may I replace the aremplacer value with the code? I know I am really weak with escaping…
Thanks,
As there is a lot of and (), how may I replace the aremplacer value with the code? I know I am really weak with escaping…