Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xSQLServerSetup: Installation hangs without any error when using UNC path #183

Closed
johlju opened this issue Nov 5, 2016 · 4 comments · Fixed by #578
Closed

xSQLServerSetup: Installation hangs without any error when using UNC path #183

johlju opened this issue Nov 5, 2016 · 4 comments · Fixed by #578
Assignees
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Nov 5, 2016

Installation hangs without any error. This happens when using UNC path in the SourcePath parameter and at the same time is not using SourceCredential.
After some debugging, it seems that Start-Process hangs when calling setup.exe and does not return.

This will be solved when PR #123 is merged.

I think the culprit is security. ;) This one that popup when I ran the command

Start-Process -FilePath \\fs.company.local\images\SQL2016RTM-ENT\setup.exe
    -ArgumentList '/IAcceptSQLServerLicenseTerms="True" /Action="Install" /InstanceName="SQL2016" /UpdateEnabled="False" /Features="IS" /BrowserSvcStartupType="Automatic"'

image

You can get around this by adding the domain to the trusted zone Local Intranet. But that is only for the logged on user. So won't do it for DSC.
image

Tried changing the local group policy to allow .exe. But that did not work. Did not try setting this in the domain, since it opens up to much.

Local Computer Policy/User Configuration/Administrative Templates/Windows Components/Attachment Manager

Setting: Inclusion list for low file types 
Value: .exe

What did work was to run Start-Process with the -NoNewWindow parameter. It then use the Microsoft .NET Framework CasPol (CasPol.exe) to "override" this lite bump. Don't know any more than that. If someone know more what happens here, please enlighten me 😄

PS C:\Windows\system32> Start-Process -FilePath \\fs.company.local\images\SQL2016RTM-ENT\setup.exe
    -ArgumentList '/IAcceptSQLServerLicenseTerms="True" /Action="Install" /InstanceName="SQL2016" /UpdateEnabled="False" /Features="IS" /BrowserSvcStartupType="Automatic"' -NoNewWindow

Microsoft (R) SQL Server 2016 13.00.1601.05
Copyright (c) 2016 Microsoft Corporation.  All rights reserved.

Microsoft .NET Framework CasPol 4.0.30319.33440
for Microsoft .NET Framework version 4.0.30319.33440
Copyright (C) Microsoft Corporation.  All rights reserved.

WARNING: The .NET Framework does not apply CAS policy by default. Any settings shown or modified by CasPol will only
affect applications that opt into using CAS policy.

Please see http://go.microsoft.com/fwlink/?LinkId=131738 for more information.


Success
Microsoft .NET Framework CasPol 4.0.30319.33440
for Microsoft .NET Framework version 4.0.30319.33440
Copyright (C) Microsoft Corporation.  All rights reserved.

WARNING: The .NET Framework does not apply CAS policy by default. Any settings shown or modified by CasPol will only
affect applications that opt into using CAS policy.

Please see http://go.microsoft.com/fwlink/?LinkId=131738 for more information.


Success
SQL Server 2016 transmits information about your installation experience, as well as other usage and performance data, t
o Microsoft to help improve the product. To learn more about SQL Server 2016 data processing and privacy controls, please see the Privacy Statement.
@johlju
Copy link
Member Author

johlju commented Nov 6, 2016

Found this that explains more about CasPol.

Caspol.exe (Code Access Security Policy Tool)
Using CasPol to Fully Trust a Share

This would trust everything under the 'foldershare'.
CasPol.exe -polchgprompt off -machine -addgroup 1.2 -url \fs.company.local\foldershare* FullTrust

So then Start-Process must call CasPol to trust the path in the -Path parameter when the parameter -NoNewWindow is used.

@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels Nov 13, 2016
@johlju
Copy link
Member Author

johlju commented Jan 3, 2017

For reference. This error occurs when not using the parameter SourceCredential. Even when PsDscRunAsCredential is used.

@johlju johlju added help wanted The issue is up for grabs for anyone in the community. and removed in progress The issue is being actively worked on by someone. labels May 22, 2017
@johlju
Copy link
Member Author

johlju commented May 28, 2017

In PR #578 there is a new timeout parameter (SetupProcessTimeout) which is meant to partly resolve this by at lest throwing an error if the setup is not finished within 2 hours (default value).

@johlju
Copy link
Member Author

johlju commented May 30, 2017

With PR #578 I cannot reproduce this one. So I think this get's solved in PR #578 thanks to it now starts the process using Setup-Process.

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels May 30, 2017
@johlju johlju self-assigned this May 30, 2017
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
1 participant