Skip to content

Instantly share code, notes, and snippets.

@MatthewSteeples
Created May 16, 2013 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthewSteeples/5589846 to your computer and use it in GitHub Desktop.
Save MatthewSteeples/5589846 to your computer and use it in GitHub Desktop.
il replacer
$version = "Intuit.Ipp.V3."
gci |
%{
$newName = $_.Name.Replace("Intuit.Ipp.", $version)
mv $_.Name $newName
}
gci -Filter *.dll |
%{
$ilName = $_.name.Replace("dll","il")
& 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\ildasm.exe' $_.name /out=$ilName
}
gci -filter *.il |
%{
$content = get-content $_.Fullname
$content = $content.Replace("Intuit.Ipp.", $version)
Set-Content -Path $_.FullName -Value $content
}
gci -Filter *.resources |
%{
$newName = $_.Name.Replace("Intuit.Ipp.", $version)
mv $_.Name $newName
}
gci -filter *.il |
%{
$dllName = $_.Name.Replace(".il", ".dll")
& C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe /dll /out=$dllName $_.Name
Start-Sleep -Seconds 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment