Closed jabteles closed 4 years ago
Please wrap the path in quotes.
Still got the same error
2020-07-01T16:28:28.6273637Z ##[debug]Evaluating condition for step: 'Deploy Windows Service'
2020-07-01T16:28:28.6274307Z ##[debug]Evaluating: succeeded()
2020-07-01T16:28:28.6274480Z ##[debug]Evaluating succeeded:
2020-07-01T16:28:28.6274768Z ##[debug]=> True
2020-07-01T16:28:28.6274980Z ##[debug]Result: True
2020-07-01T16:28:28.6275205Z ##[section]Starting: Deploy Windows Service
2020-07-01T16:28:28.6352130Z ==============================================================================
2020-07-01T16:28:28.6352260Z Task : Windows Service Manager
2020-07-01T16:28:28.6352386Z Description : Deploys a Windows Service to an Agent or a Deployment Group Target using WinRM.
2020-07-01T16:28:28.6352646Z Version : 4.4.9
2020-07-01T16:28:28.6352724Z Author : MDSolutions
2020-07-01T16:28:28.6352843Z Help : [More Information](https://github.com/Dejulia489/WindowsServiceManager)
2020-07-01T16:28:28.6352965Z ==============================================================================
2020-07-01T16:28:29.2922461Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
2020-07-01T16:28:29.4305513Z ##[debug]INPUT_DEPLOYMENTTYPE: 'Agent'
2020-07-01T16:28:29.4362307Z ##[debug]INPUT_SERVICENAME: 'ServiceName'
2020-07-01T16:28:29.4420133Z ##[debug]INPUT_ARTIFACTPATH: 'C:\tmp\ServiceName\'
2020-07-01T16:28:29.4483615Z ##[debug]INPUT_TIMEOUT: '30'
2020-07-01T16:28:29.4556530Z ##[debug]INPUT_CLEANINSTALL: 'true'
2020-07-01T16:28:29.4569485Z ##[debug] Converted to bool: True
2020-07-01T16:28:29.4628012Z ##[debug]INPUT_RECREATESERVICE: 'false'
2020-07-01T16:28:29.4642207Z ##[debug] Converted to bool: False
2020-07-01T16:28:29.4704933Z ##[debug]INPUT_STOPPROCESS: 'true'
2020-07-01T16:28:29.4718301Z ##[debug] Converted to bool: True
2020-07-01T16:28:29.4786458Z ##[debug]INPUT_INSTALLSERVICE: 'true'
2020-07-01T16:28:29.4804092Z ##[debug] Converted to bool: True
2020-07-01T16:28:29.4866262Z ##[debug]INPUT_STARTSERVICE: 'true'
2020-07-01T16:28:29.4880726Z ##[debug] Converted to bool: True
2020-07-01T16:28:29.4987094Z ##[debug]Entering C:\ReleaseAgents\agent1\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.4.9\DeployWindowsService.ps1.
2020-07-01T16:28:29.5072058Z ##[debug]INPUT_MACHINES: 'ServerName'
2020-07-01T16:28:29.5226996Z Begining deployment to [ServerName]
2020-07-01T16:28:29.5244783Z ##[debug]INPUT_ADMINLOGIN: 'domain\user'
2020-07-01T16:28:29.5264375Z ##[debug]INPUT_PASSWORD: '***'
2020-07-01T16:28:29.5357977Z ##[debug]INPUT_NEWPSSESSIONOPTIONARGUMENTS (empty)
2020-07-01T16:28:29.5453670Z ##[debug]Entering Get-NewPSSessionOption.
2020-07-01T16:28:29.5528787Z ##[debug] arguments: ''
2020-07-01T16:28:29.5545047Z ##[debug]New-PSSessionOption command: New-PSSessionOption
2020-07-01T16:28:29.5611305Z ##[debug]Leaving Get-NewPSSessionOption.
2020-07-01T16:28:29.5637818Z ##[debug]INPUT_USESSL: 'false'
2020-07-01T16:28:29.5651710Z ##[debug] Converted to bool: False
2020-07-01T16:28:29.5670538Z ##[debug]INPUT_INSTALLTOPSHELFSERVICE: 'false'
2020-07-01T16:28:29.6200485Z ##[debug] Converted to bool: False
2020-07-01T16:28:29.6219435Z ##[debug]INPUT_INSTALLATIONPATH: '"%programfiles%\enterprise\ServiceName\ServiceName.Main.exe"'
2020-07-01T16:28:29.6237494Z ##[debug]INPUT_SERVICEDISPLAYNAME (empty)
2020-07-01T16:28:29.6254459Z ##[debug]INPUT_SERVICEDESCRIPTION (empty)
2020-07-01T16:28:29.6271585Z ##[debug]INPUT_SERVICESTARTUPTYPE: 'Automatic'
2020-07-01T16:28:29.6404697Z ##[debug]Caught exception from task script.
2020-07-01T16:28:29.6883890Z ##[debug]Error record:
2020-07-01T16:28:29.7170671Z ##[debug]Get-FullExecuteablePath : String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string ["%programfiles%\enterprise\ServiceName\ServiceName.Main.exe"]
2020-07-01T16:28:29.7178254Z ##[debug]At C:\ReleaseAgents\agent1\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.4.9\DeployWindowsService.ps1:182 char:25
2020-07-01T16:28:29.7186056Z ##[debug]+ ... ationPath = Get-FullExecuteablePath -StringContainingPath $startComma ...
2020-07-01T16:28:29.7193710Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-07-01T16:28:29.7201434Z ##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
2020-07-01T16:28:29.7209162Z ##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-FullExecuteablePath
2020-07-01T16:28:29.7216791Z ##[debug]
2020-07-01T16:28:29.7229411Z ##[debug]Script stack trace:
2020-07-01T16:28:29.7253792Z ##[debug]at Get-FullExecuteablePath, C:\ReleaseAgents\agent1\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.4.9\DeployWindowsService.ps1: line 141
2020-07-01T16:28:29.7261630Z ##[debug]at <ScriptBlock>, C:\ReleaseAgents\agent1\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.4.9\DeployWindowsService.ps1: line 182
2020-07-01T16:28:29.7269649Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-07-01T16:28:29.7277106Z ##[debug]at <ScriptBlock>, <No file>: line 22
2020-07-01T16:28:29.7284845Z ##[debug]at <ScriptBlock>, <No file>: line 18
2020-07-01T16:28:29.7292550Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-07-01T16:28:29.7304740Z ##[debug]Exception:
2020-07-01T16:28:29.7333939Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string ["%programfiles%\enterprise\ServiceName\ServiceName.Main.exe"]
2020-07-01T16:28:29.7543598Z ##[error]String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string ["%programfiles%\enterprise\ServiceName\ServiceName.Main.exe"]
2020-07-01T16:28:29.7550976Z ##[debug]Processed: ##vso[task.logissue type=error]String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string ["%programfiles%\enterprise\ServiceName\ServiceName.Main.exe"%5D
2020-07-01T16:28:29.7566633Z ##[debug]Processed: ##vso[task.complete result=Failed]
2020-07-01T16:28:29.7761970Z ##[section]Finishing: Deploy Windows Service
Oh I see, now you are using a Systemvariable, which contains '%' I will add this in my fix and make a PR
duplicate of #39
This should be resolved with the latest release of v2.0.65
This still occurs with "%programfiles%\enterprise$(Service.Name)\ServiceName.exe".
Hi,
After updating task from version 4.3.5 to 4.4.9 the "Start command" input box in "Install Service" section of the task doesn't accept paths with white spaces.
I was passing the string "%programfiles%\enterprise\$(Service.Name)\ServiceName.exe" working in 4.3.5.
Which now gives the error (Some data anonymized) in 4.4.9: