Jump to content

Recommended Posts

Posted

Hi all,

 

I have set up an offline deployment for Visual Studio 2019 which works well.

 

I can go to an IT suite, log in locally and run "\\servername\software\Visual_Studio_2019\vs_community.exe --quiet --wait --norestart" and the offline installation runs and installs as expected.

 

However, if I put this exact same command into MDT (as shown below). The deployment gets stuck at this point.

 

VS2019instal;.png

 

If I look in task manager on the PC, the "vs_community.exe" is running but not doing anything by the looks of things - And it will sit here for days and never finishes.

 

The program does not install on the PC either.

 

I have looked into the logs and cannot see anything obvious.

 

Has anyone else come across this and if so how did you resolve it?

 

I have also got the custom response.json (which appears to be used during the manual installation).

 

{
"installChannelUri":".\\ChannelManifest.json",
"channelUri":"https://aka.ms/vs/16/release/channel",
"installCatalogUri":".\\Catalog.json",
"channelId":"VisualStudio.16.Release",
"productId":"Microsoft.VisualStudio.Product.Community",

"quiet": true,
"passive": false,
"includeRecommended": true,
"norestart": true,

"add":[
"Component.GitHub.VisualStudio;includeOptional","Microsoft.VisualStudio.Workload.ManagedDesktop;includeOptional","Microsoft.VisualStudio.Workload.NetWeb;includeOptional"
],

"addProductLang":["en-US"]
}

 

 

 

Thanks in anticipation.

 

Kind regards, Ed

Posted
I had similar, It used to work then when we moved to 1903 it showed the same symptoms you see now. Oddly the exact same setup works with SCCM just not MDT. Never did resolve it so will watch on hopefully.
Posted
Could it be because MDT runs the installer under the local Administrator account whereas SCCM (MECM) uses the SYSTEM account?

 

https://ccmexec.com/2016/10/context-difference-between-a-task-sequence-in-mdt-and-sccm

 

Hmmm, the strange thing is that we log in with our local administrator account to do the manual installation which works.

 

The MDT task sequence logs in through the process with the same local administrator account.

 

Kind regards, eddyc

Posted

It shouldn't make any difference but if you've set the working directory you shouldn't need to specify the full path to the exe. Although in our case we import the packages into MDT to avoid any potential permissions issues, so that may be why for us. Other than that I wonder if it is doing something unusual with the switches or just ignoring them, I remember having similar issues with VLC through MDT (for 1803) we only resolved that by converting it to an msi.

 

The only other thing I would try is to use MDT to copy the exe locally and try to get it to install from there.

Posted
It shouldn't make any difference but if you've set the working directory you shouldn't need to specify the full path to the exe. Although in our case we import the packages into MDT to avoid any potential permissions issues, so that may be why for us. Other than that I wonder if it is doing something unusual with the switches or just ignoring them, I remember having similar issues with VLC through MDT (for 1803) we only resolved that by converting it to an msi.

 

The only other thing I would try is to use MDT to copy the exe locally and try to get it to install from there.

I had this with some software in the past.

Make sure you are using the fqdn in your server name not the netbios name in the working directory.

Posted
I had this with some software in the past.

Make sure you are using the fqdn in your server name not the netbios name in the working directory.

 

Hi there,

 

Thanks for the suggestion, I have tried this but unfortunately it is still the same.

 

eddyc

Posted

OK, this is really strange and is bugging me now!

 

If I create a batch file called install.exe which contains:

\\SERVER\software\Visual_Studio_2019\vs_community.exe --quiet --wait --norestart

 

And call the batch file via the task sequence instead, it installs as expected.

 

I don't get it!

Posted
OK, this is really strange and is bugging me now!

Did you try @foofighterjim's suggestion? i.e. remove the UNC folder path from the quiet install command.

 

Could MDT be doing something stupid like combining the working directory with the install command:

 

\\Server\Software\Visual_Studio_2019\\\Server\Software\Visual_Studio_2019\vs_community.exe --quiet --wait --norestart

Posted
Did you try @foofighterjim's suggestion? i.e. remove the UNC folder path from the quiet install command.

 

Could MDT be doing something stupid like combining the working directory with the install command:

 

\\Server\Software\Visual_Studio_2019\\\Server\Software\Visual_Studio_2019\vs_community.exe --quiet --wait --norestart

 

Hi @Arthur

 

Yes I did change it to this;

VS20192.png

 

But it still did the same and did not install.

 

eddyc

Posted

We currently deploy VS with MDT and I had the same issue with deploying it using the silent install command so we call the installer via a .bat file which calls the silent installer

 

I have a bundle in MDT that does the following:

 

Step 1:

Install the Visual Studio security certificates via powershell script to the local machine - located in the Professional\certificates folder of your offline install

Content of script:

	certutil.exe -addstore -f "Root" "$PathToInstaller\Professional\certificates\manifestRootCertificate.cer"
	certutil.exe -addstore -f "Root" "$PathToInstaller\Professional\certificates\manifestCounterSignRootCertificate.cer"
	certutil.exe -addstore -f "Root" "$PathToInstaller\Professional\certificates\vs_installer_opc.RootCertificate.cer"
	

 

Step 2:

Call a .bat file to install the software

 

MDT command:

cmd.exe /c "\InstallVS2019.bat"

 

InstallVS2019.bat content:

	cls
  @echo off
	Echo Installing Microsoft Visual Studio 2019 Professional edition
	Echo Please wait......

	start /wait $PathToFile\Professional\vs_professional.exe --in $PathToResponseFile\Professional\Response.json --passive --wait --norestart
	echo %errorlevel%
	

 

Response File content:

	{
		"installChannelUri": ".\\ChannelManifest.json",
		"channelUri": "\\ChannelManifest.json",
		"installCatalogUri": ".\\Catalog.json",
		"channelId": "VisualStudio.16.Release",
		"productId": "Microsoft.VisualStudio.Product.Professional",
		"includeRecommended": true,
		"productKey": "xxxxxxxxxxxxxxxxxx",
		"add": [
			"Microsoft.VisualStudio.Workload.ManagedDesktop",
			"Microsoft.VisualStudio.Workload.NativeDesktop",
			"Microsoft.VisualStudio.Workload.NetWeb",
			"Microsoft.VisualStudio.Workload.Python",
			"Microsoft.VisualStudio.Workload.Universal"
		],
		"addProductLang": [
			"en-US"
		]
	}		
	

 

Step 3:

Tidy up the start menu via powershell

 

HTH

 

Neil

  • 2 months later...
Posted

Just to update everyone, our head of IT wanted both visual studio 2017 and visual studio 2019.

 

I’ve found if you install 2019 BEFORE 2017 in the task sequence it goes through fine with no errors or issues.

 

eddyc

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...