X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=ucSTa9Q 1OtWQfqCRXalZ2MiB8VsmrFiA9x1StkXsRGHGwEXWWAGg0jrWmzZgW9nt4kqT7YT 6JD/giW2iGAFNLoABDKImNFN7zfcRWDvbLH67RcQERwvFb6XPQJZGfJMkTYh9BIo oc974G8g6/I+v1IS+emwuPJr6t14axYW7spM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=XWzz+d1+RA9i3 i3CQAQ6YS93a78=; b=LQtnHPVQlBkooGX7zvk84/7LPAeyBAHTqM2pIZcEqUtoI OKtnD0SwrjWapFo/fOAfK8oniuI6FvwrTHnDLvSG18GyjoJfvUTf/ojLYkd62hFY bBVo9pIPxBr47pv4jV22PYvO1CxQyiJYzUnrrbQ1wuHLSoR4YSEMDPoCrLe3wE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=installer, cygrunsrv, Manager, services X-HELO: mout.gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1580142006; bh=v8+uUdB7vfBf2fIbYpQAt4YiZ9+xLFgEkkWubrNBM7w=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To; b=CUAOAifoEBd98Ery5VlkLNIHIJFwjTbuZp75MaIYKy52aT1VOm+OZvtdIPa0+9UwF CdGinb2G1kfrkfJq1exZCXC1OABHdi/Erq/QTFEVSPMGJVIJ2w1IPVE+j/d5F4Oj0o XZD6OB27vxRN4s6n5bUqW/7AYSv4ubgFjdhACv+o= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 MIME-Version: 1.0 References: In-Reply-To: From: Bill Stewart Date: Mon, 27 Jan 2020 09:19:37 -0700 Message-ID: Subject: Re: Windows Restart Manager and cygrunsrv services To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes On Thu, Jan 23, 2020 at 10:44 AM Bill Stewart wrote: > However it seems that when running a service using cygrunsrv, the > Restart Manager RmGetList API[2] returns RmRebootReasonSessionMismatch > (2) for the lpdwRebootReasons output parameter. > > This parameter return value is one of the RM_REBOOT_REASON enumeration > values[3]. > > The description for the RmRebootReasonSessionMismatch value on MSDN is > as follows: "One or more processes are running in another Terminal > Services session." > > I ran into this building an Inno Setup installer. I reproduced on > Windows 10 x64 and Windows Server 2008 R2 x64. > > The error description is interesting, because in neither repro case > were there other users logged on using TS sessions. (I'm not sure if > that error description is completely accurate in describing all cases > where that value gets returned, though...) > > Unexpected behavior: Restart Manager returns 2 > (RmRebootReasonSessionMismatch) in the lpdwRebootReasons output > parameter when calling the RmGetList API to detect a cygrunsrv > service. > > Expected behavior: Restart Manager should return 0 > (RmRebootReasonNone) in the lpdwRebootReasons output parameter when > calling the RmGetList API to detect a cygrunsrv service. > > Further details (regarding Inno Setup and this problem): > https://groups.google.com/d/msg/innosetup/9dAT3wB9RTQ/99Py-ZgLCgAJ > > Any ideas why Restart Manager doesn't work for cygrunsrv services? > > Thanks! > > Bill > > ____________________ > > [1] https://docs.microsoft.com/en-us/windows/win32/rstmgr/about-restart-manager > > [2] https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/nf-restartmanager-rmgetlist > > [3] https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/ne-restartmanager-rm_reboot_reason Question also posted on StackOverflow: https://stackoverflow.com/questions/59902201/ Any insights appreciated. Thanks! Bill -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple