i configured my deployment of Visual Studio 2013 Pro to be an attended installation (visible) therefore the command line is simply "vs_professional.exe" . Once deployed to the clients, they can launch the install themselves at a convenient time for them and they only have to do a few clicks to get it started. the install takes close to an hour to complete.
The process still is executed with the system account but it did not crash like username Bitmapped mentionned above.
When you try to do a silent install of Visual Studio 2013 Pro, it wants to add the current user to the Performance Log Users group on the computer. If you're deploying via SCCM where the installer is run as the SYSTEM account, this poses a problem. Trying to add SYSTEM to the group doesn't work and the whole installer fails.
I could not locate an option to stop the Visual Studio installer from trying to add the user to the group. The installer ignores MSTs and trying to edit the professionalcore MSI failed because it broke the Authenticode signature.
My solution was to use a combination of PSEXEC and PowerShell to wrap the installer. PowerShell creates a new local user account, makes it an admin, and then uses PSEXEC to run the installer under that new user account with elevated privileges. After the installation is done, the new admin account is deleted.
I wasn't able to figure out a good way to get the return code back from the installer in this scenario so I'm just assuming it is 0. I figured SCCM's application detection will know if the install failed anyway.
Here is my PowerShell script:
# Settings for SCCM user $sccmUsername = "SCCM-VSAdmin" $sccmPassword = "pswdG03sHer3" # See if we are operating as the system account $systemAccountName = $ENV:COMPUTERNAME + "$" if ($systemAccountName -ne $ENV:USERNAME) { Write-Host "This script must be run as the SYSTEM account." Write-Host "Exiting." exit 1 } # Create new admin account if needed $adminExists = [ADSI]::Exists("WinNT://./$sccmUsername") if (!$adminExists) { # Create account Write-Host "Account needs created" # Get computer account $computer = [ADSI]"WinNT://$Env:COMPUTERNAME,Computer" # Create user $sccmAdmin = $Computer.Create("User", $sccmUsername) $sccmAdmin.SetPassword($sccmPassword); $sccmAdmin.SetInfo() $sccmAdmin.description = "Visual Studio SCCM Administrator"; $sccmAdmin.SetInfo() # Add new user to local Administrators group $adminGroup = [ADSI]"WinNT://./Administrators,Group" $adminGroup.Add("WinNT://$sccmUsername,User") Write-Host "Added to group" } # Test to make sure account was created. $adminExists = [ADSI]::Exists("WinNT://./$sccmUsername") if (!$adminExists) { Write-Host "User still does not exist. Exiting." exit 2 } # Presumably we should be ready to run the installer. Write-Host "Starting installation" .\PSEXEC.exe -accepteula -h -u $sccmUsername -p $sccmPassword $PSScriptRoot\vs_professional.exe /AdminFile AdminDeployment.xml /Passive /NoRestart Write-Host "Finishing installation" # Delete local username NET USER $sccmUsername /DELETE Write-Host "Local admin user deleted." Write-Host "Installation finished." exit 0
View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.