Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $filePath = "C:\ProgramData\Danaher_Dental\DEXIS.ini"
- ((Get-Content -Path $filePath -Raw) -replace 'DataPath=', 'D4=') | Set-Content -Path $filePath
- (Get-Content $filePath) |
- ForEach-Object{
- $_
- if ($_ -match "D4=.*"){
- "DataPath=$newPath"
- }
- } | Set-Content $filePath
- ((Get-Content -Path $filePath -Raw) -replace 'D4=.*', '') | Set-Content -Path $filePath
- Write-Host $newPath " has been set as the new path."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement