From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78410 invoked by alias); 27 Jan 2020 16:20:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 78403 invoked by uid 89); 27 Jan 2020 16:20:09 -0000 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 Received: from mout.gmx.com (HELO mout.gmx.com) (74.208.4.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Jan 2020 16:20:07 +0000 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 Received: from mail-lj1-f182.google.com ([209.85.208.182]) by mail.gmx.com (mrgmxus002 [74.208.5.15]) with ESMTPSA (Nemesis) id 0MegOs-1jFzRt46MC-00OGFR for ; Mon, 27 Jan 2020 17:20:06 +0100 Received: by mail-lj1-f182.google.com with SMTP id q8so7225828ljb.2 for ; Mon, 27 Jan 2020 08:20:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bill Stewart Date: Mon, 27 Jan 2020 16:20:00 -0000 Message-ID: Subject: Re: Windows Restart Manager and cygrunsrv services To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00254.txt.bz2 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