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

MSFT_xSQLServerSetup/StartWin32Process fails to execute setup.exe #93

Closed
Zuldan opened this issue Aug 5, 2016 · 3 comments · Fixed by #578
Closed

MSFT_xSQLServerSetup/StartWin32Process fails to execute setup.exe #93

Zuldan opened this issue Aug 5, 2016 · 3 comments · Fixed by #578
Labels
bug The issue is a bug.

Comments

@Zuldan
Copy link

Zuldan commented Aug 5, 2016

When xSQLServerSetup starts to execute setup.exe (line 782) it just sits there and does nothing (see verbose below). The setup.exe file is never executed and therefore no SQL setup logs are created. I cannot see any issues in Event Logs either.

If I use PsDscRunAsCredential and replace line 782 from

$Process = StartWin32Process -Path $Path -Arguments $Arguments

to

$Process = StartWin32Process -Path $Path -Arguments $Arguments -AsTask -Credential $SetupCredential

then the setup.exe file is executed and SQL Server is installed perfectly. So maybe adding a property called InstallFromScheduledTask added to xSQLServerSetup would be beneficial?

xSQLServer = 1.7.0.0
WMF = v5.0.10586.117
.NET = 3.5.1
.NET = v4.6.1 (tried v4.6.2 as well)
OS = Windows 2012 R2
SQL = 2012 (tried 2014 as well)
Windows Updates = Latest up to 05/08/2016
UAC = Disabled

VERBOSE: [TESTSERVER02]: LCM: [ Start Resource ] [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [TESTSERVER02]: LCM: [ Start Test ] [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'GetxPDTVariable'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'NetUse'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'ResolvePath'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'StartWin32Process'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Path: \myfileserver\SQLServer2014\Source\setup.exe
VERBOSE: [TESTSERVER02]: LCM: [ End Test ] [[xSQLServerSetup]SQLServerSetup] in 0.7340 seconds.
VERBOSE: [TESTSERVER02]: LCM: [ Start Set ] [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'GetxPDTVariable'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'NetUse'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'ResolvePath'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'StartWin32Process'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Path: \myfileserver\SQLServer2014\Source\setup.exe
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'GetxPDTVariable'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'NetUse'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'ResolvePath'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'StartWin32Process'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Path: \myfileserver\SQLServer2014\Source\setup.exe
VERBOSE: [TESTSERVER02]: [[xSQLServerSetup]SQLServerSetup] Arguments: /Quiet="True" /IAcceptSQLServerLicenseTerms="True" /Action="Install" /AGTSVCSTARTUPTYPE=Automatic /InstanceName="MSSQLSERVER" /Features="SQLENGINE,FULLTEXT,IS
" /InstallSharedDir="C:\Program Files\Microsoft SQL Server" /InstallSharedWOWDir="C:\Program Files (x86)\Microsoft SQL Server" /InstanceDir="C:\Program Files\Microsoft SQL Server" /InstallSQLDataDir="S:\Data" /SQLUserDBDir="S:\Data" /SQLUserDBLogDir="L:\Logs
" /SQLTempDBDir="T:\Temp" /SQLTempDBLogDir="T:\Temp" /SQLSysAdminAccounts="MySQLAdmin"

@kwirkykat kwirkykat added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Aug 9, 2016
@johlju
Copy link
Member

johlju commented Sep 2, 2016

Does PR #123 resolve this issue?

@johlju
Copy link
Member

johlju commented Apr 22, 2017

@Zuldan Is this still an issue?

@johlju
Copy link
Member

johlju commented Apr 22, 2017

@Zuldan Forget that last question. Was thinking of something else. This is still an issue.

@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 21, 2017
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 21, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 27, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 30, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jun 3, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jun 4, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jun 5, 2017
BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue dsccommunity#41, dsccommunity#93 and dsccommunity#126).
johlju added a commit that referenced this issue Jun 6, 2017
… support, xSQLServerSetup supports PsDscRunAsCredential (#578)

- Changes to xSQLServer
  - BREAKING CHANGE: xSQLServer does no longer try to support WMF 4.0 (PowerShell 4.0) (issue #574). Minimum supported version of WMF is now 5.0 (PowerShell 5.0).
  - BREAKING CHANGE: Removed deprecated resource xSQLAOGroupJoin (issue #457).
  - BREAKING CHANGE: Removed deprecated resource xSQLAOGroupEnsure (issue #456).
  - BREAKING CHANGE: Removed deprecated resource xSQLServerFailoverClusterSetup (issue #336).
- Changes to xSQLServerHelper
  - Removed helper function Grant-ServerPerms because the deprecated resource that was using it was removed.
  - Removed helper function Grant-CNOPerms because the deprecated resource that was using it was removed.
  - Removed helper function New-ListenerADObject because the deprecated resource that was using it was removed.
- Changes to xSQLServerSetup
  - BREAKING CHANGE: Replaced StartWin32Process helper function with the cmdlet Start-Process (issue #41, #93 and #126).
  - BREAKING CHANGE: The parameter SetupCredential has been removed since it is no longer needed. This is because the resource now support the built-in PsDscRunAsCredential.
  - BREAKING CHANGE: Now the resource supports using built-in PsDscRunAsCredential. If PsDscRunAsCredential is set, that username will be used as the first system administrator.
  - BREAKING CHANGE: If the parameter PsDscRunAsCredential are not assigned any credentials then the resource will start the setup process as the SYSTEM account. When installing as the SYSTEM account, then parameter SQLSysAdminAccounts and ASSysAdminAccounts must be specified when installing feature Database Engine and Analysis Services respectively.
  - When setup exits with the exit code 3010 a warning message is written to console telling that setup finished successfully, but a reboot is required (partly fixes issue #565).
  - When setup exits with an exit code other than 0 or 3010 a warning message is written to console telling that setup finished with an error (partly fixes issue #580).
  - Added a new parameter SetupProcessTimeout which defaults to 7200 seconds (2 hours). If the setup process has not finished before the timeout value in SetupProcessTimeout an error will be thrown (issue #566).
  - Updated all examples to match the removal of SetupCredential.
  - Updated (removed) severe known issues in README.md for resource xSQLServerSetup.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jun 6, 2017
johlju added a commit that referenced this issue Jan 2, 2023
…1828)

- SqlServerDsc
  - Removed `Test-ServiceAccountRequirePassword` from private functions (issue #1794)
    - Replaced by `Test-AccountRequirePassword` that was added to _DscResource.Common_
      public functions ([issue #93](dsccommunity/DscResource.Common#93)).
  - Removed `Assert-RequiredCommandParameter` from private functions (issue #1796).
    - Replaced by `Assert-BoundParameter` (part of _DscResource.Common_)
      that had a new parameter set added ([issue #92](dsccommunity/DscResource.Common#92)).
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
3 participants