/build/static/layout/Breadcrumb_cap_w.png

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login
Views: 10k  |  Created: 04/14/2007

Average Rating: 0
Visual Studio has 2 inventory records, 23 Questions, 2 Blogs and 8 links. Please help add to this by sharing more!

Deployment Tips (3)

Most Common Setup Type
Windows Installer (Delivered as an EXE)
Average Package Difficulty Rating
Rated 3 / 5 (Average) based on 2 ratings
Most Commonly Reported Deployment Method
Vendor Provided Command Line (answer file driven)
1
Command Line

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.

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: Very Easy
Platform(s): Windows
1
Note
"\\Server\vs_professional.exe" /silent  /norestart
Setup Information:
Setup Type: Windows Installer (Delivered as an EXE)
Deployment Method Used: Windows Installer Command Line (No MST)
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note

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
Setup Information:
Setup Type: Windows Installer (Delivered as an EXE)
Deployment Method Used: Vendor Provided Command Line (answer file driven)
Deployment Difficulty: Somewhat Difficult
Platform(s): Windows

Inventory Records (2)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.

Visual Studio

Version

12.0.4518.1035

Uninstall String

MsiExec.exe /X{90120000-0118-0000-0000-0000000FF1CE}

Questions & Answers (23)

Questions & Answers related to Microsoft Visual Studio

2
ANSWERS
1
ANSWERS
2
ANSWERED
3
ANSWERS
1
ANSWERS
1
ANSWERS
1
ANSWERS
2
ANSWERS
1
ANSWERS
2
ANSWERS

Blogs (2)

Blog posts related to Microsoft Visual Studio

Reviews (0)

Reviews related to Microsoft Visual Studio

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ