SHARE
TWEET

Untitled

a guest Jul 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $filePath = "C:\ProgramData\Danaher_Dental\DEXIS.ini"
  2.  
  3.     ((Get-Content -Path $filePath -Raw) -replace 'DataPath=', 'D4=') | Set-Content -Path $filePath
  4.    
  5.     (Get-Content $filePath) |
  6.         ForEach-Object{
  7.             $_
  8.             if ($_ -match "D4=.*"){
  9.                
  10.                 "DataPath=$newPath"
  11.             }
  12.         } | Set-Content $filePath
  13.  
  14.      ((Get-Content -Path $filePath -Raw) -replace 'D4=.*', '') | Set-Content -Path $filePath
  15.  
  16.     Write-Host $newPath " has been set as the new path."
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top