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

Unable to keep remote .exe executing after winrm session has ended #55

Open
mlamutt opened this issue Nov 29, 2017 · 1 comment
Open

Comments

@mlamutt
Copy link

mlamutt commented Nov 29, 2017

Hello,

I have run into an issue after upgrading to 1.7.0, where I am using the winrm plugin to run an install.exe file on a remote windows server. The install.exe is spawned and then the winrm session closes, at which point the install.exe session also is terminated. This behavior is not seen on the 1.5.1 version.

I found that if I added a wait after the install.exe is spawned, the exe will complete successfully.

Running this script step fails:

 wget "http://software.prod.net/drone/[email protected]@.exe" -outfile 
"c:\build\drone\[email protected]@.exe"

 c:\build\drone\[email protected]@.exe

Running this script step is successful:

  wget "http://software.prod.net/drone/[email protected]@.exe" -outfile 
"c:\build\drone\[email protected]@.exe"

  c:\build\drone\[email protected]@.exe
  wait 30

Running this script step is also successful:

  wget "http://software.prod.net/drone/[email protected]@.exe" -outfile 
"c:\build\drone\[email protected]@.exe"

  cmd /c "c:\build\drone\[email protected]@.exe"

if I set the wait to 10 seconds I can watch the process page and see both the winrm and exe sessions terminate at the same time. I have also tried to force the exe to install silently, without any change in behavior.

any ideas on why this behavior changed between the versions?

@UnicodeTreason
Copy link
Contributor

Hrmm no specific changes to the script should have modified that behaviour that I can see.
It's possible the updated gems we are using are little better at closing sessions than before or something.

If you run the installer via PowerShell you should be able to make your script -Wait for the process to finish before continuing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants