Guest User

Untitled

a guest
Nov 29th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. @echo off
  2. set /p username="UserName: "
  3. set /p password="Password: "
  4. C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe Syns.sln /p:Configuration=Produção;DeployOnBuild=true;PublishProfile=prod.pubxml /MaxCpuCount:8 /p:AllowUntrustedCertificate=True /p:UserName=%username% /p:Password=%password%
  5.  
  6. Write-Host "UserName:"
  7. $username = Read-Host
  8.  
  9. Write-Host "Password:"
  10. $password = Read-Host -AsSecureString
  11. $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
  12.  
  13.  
  14. $msbuild = "C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuild15.0BinMSBuild.exe"
  15. $collectionOfArgs = @("D:ProjetosSynsSynsSyns.sln",
  16. "/p:Configuration=Prod;DeployOnBuild=true;PublishProfile=prod.pubxml",
  17. "/MaxCpuCount:8",
  18. "/p:AllowUntrustedCertificate=True",
  19. "/p:UserName=$username",
  20. "/p:Password=$password")
  21.  
  22. & $msbuild $collectionOfArgs
  23.  
  24. Write-Host "Informe sua senha:"
  25. $senhaCodificada = Read-Host -AsSecureString
  26. $senhaTextoPuro = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($senhaCodificada))
Add Comment
Please, Sign In to add comment