shutdown

远程关机 (Windows shutdown Windows)

爷,独闯天下 提交于 2020-01-07 11:32:19
在某些场景,可使用远程关机控制整个局域网中的所有电脑进行一键关机或重启,便于管理,以提高工作效率。 从远程系统强制关机,首先需要进行一些必要的设置。 1、使用 win + R 打开运行,输入gpedit.msc。 2、按下确定键,弹出窗口,本地组策略编辑器。   依次按顺序选着:   计算机配置 -> Windows 设置 -> 安全设置 -> 本地策略 -> 用户权限分配。   在用户权限分配中,找到 “从远程强制关机”,双击打开。 3、弹出对话框,“从远程系统强制关机 属性”。   依次点击红圈按钮。   添加用户或组 -> 高级 -> 立即查找 -> 找到 Guest -> 确定 4、完成以上设置,即可开始进行远程关机操作。   (1)win + R 打开运行,输入 cmd。   (2)shutdown -s -t 10 -m IP   其中 IP 为所需关掉电脑的IP。   该命令表示,在十秒后关闭此IP电脑。   (3)shutdown -r -t 10 -m IP   该命令表示,在十秒后重启此IP电脑。 注意:   某些电脑完成以上设置之后,仍无法通过远程关机。   可能存在以下问题:   (1)局域网内无法 ping 通。   (2)访问权限依然不够。 解决方案: 1、使用 win + R 打开运行,输入gpedit.msc。 2、按下确定键,弹出窗口

SDK Android : How to open Shutdown/Reboot dialog for the device

人走茶凉 提交于 2020-01-07 06:16:08
问题 I'm new here. I have a problem, i try to shutdown a 4.2.2 android device (not root). I know that ACTION_SHUTDOWN not works with unroot device. So i want to open the existing shutdown/reboot/airplane dialog, the same we get when we maintain the on/off button. Then the user just have to click shutdown button. I try to create by this way, without result... Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS); // or others settings startActivity(intent); Thanks, 回答1: The is no public sdk

Run process during windows shutdown

点点圈 提交于 2020-01-07 01:30:53
问题 I have a Win32 service, that needs to run a .NET executable on service stop (for cleanup reasons). I recently discovered that the cleanup never happens on shutdown, because the process creation gets blocked by OS. Does anyone know a way to override this? Process, I am spawning is not invasive and should only run a fraction of a second. 回答1: The only way I could find to do it was: pre-create a child process suspended, and them un-suspend it on shutdown. 来源: https://stackoverflow.com/questions

Tomcat的安装和优化

▼魔方 西西 提交于 2020-01-07 01:15:31
tomcat安装 tomcat基于java开发 首先准备java环境 jdk源码地址:http://hg.openjdk.java.net tomcat源码地址:http://archive.apache.org/dist/tomcat 下载完成后上传jdk与tomcat源码包并解压 检测java环境是否安装: [root@ localhost tomcat]# java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) 完成后进入到tomcat文件中开启tomcat cd /usr/local/tomcat/bin/ 开启tomcat ./startup.sh 关闭tomcat ./shutdown.sh tomcat默认端口为8080 访问页面localhost:8080 tomcat单机多实例 顾名思义就是在一台机器上安装多个tomcat并运行 所以我们只需要修改端口号避免冲突启功即可 vim /usr/local/tomcat2/conf/server.xml 修改以下三处内容: ---------------------

Programmatically shut down or sleep sandboxed application Mac

大城市里の小女人 提交于 2020-01-06 12:43:35
问题 I am trying to make an application for the Mac App Store that will shut down/sleep the Mac after a user-set time. I have tried to use AppleScript, but that won't work if I am going to use it in Sandbox mode, I have tried to Google for a solution, but I cant seem to figure it out. Hope someone can give me a hint or link to relevant documentation. edit: made it more precise to what I desire to accomplish. 回答1: There is no way to do this. You may try to get a temporary-exception to run "shutdown

Linux Redis 开机启动

主宰稳场 提交于 2020-01-05 18:16:08
通过初始化脚本启动Redis 在Redis源代码目录的utils文件夹中有一个名为 redis_init_script 的初始化脚本文件。需要配置Redis的运行方式和持久化文件、日志文件的存储位置。步骤如下: 1、配置初始化脚本 首先将初始化脚本复制到/etc/init.d 目录中,文件名为 redis_端口号,其中端口号表示要让Redis监听的端口号,客户端通过该端口连接Redis。然后修改脚本第6行的REDISPORT变量的值为同样的端口号。 2、建立以下需要的文件夹。 目录名 Value /etc/redis 存放Redis的配置文件 /var/redis/端口号 存放Redis的持久化文件 3、修改配置文件 首先将配置文件模板(redis-4.0.2/redis.conf)复制到/etc/redis 目录中,以端口号命名(如“6379.conf”),然后按照下表对其中的部分参数进行编辑。 参数 值 说明 daemonize yes 使Redis以守护进程模式运行 pidfile /var/run/redis_端口号.pid 设置Redis的PID文件位置 port 端口号 设置Redis监听的端口号 dir /var/redis/端口号 设置持久化文件存放位置 现在也可以使用下面的命令来启动和关闭Redis了 /etc/init.d/redis_6379 start

shutdown iOS programmatically

给你一囗甜甜゛ 提交于 2020-01-04 06:09:12
问题 Is it possible to shutdown an iOS device (iPhone, iPad, iPod) with objective c? I have searched the internet through and through, and nothing at all has come up. I was just thinking about it, how much control over the device you really have. Does anyone know if this is possible? If so, how? 回答1: No, it's not possible in a non-"jailbroken" state. Your app cannot escape it's own "sandbox" and consequently has no access to system calls that could be used to control the power state of the device.

StreamWriter Writing NUL characters at the end of the file when system shutdown abruptly

余生长醉 提交于 2020-01-04 04:19:14
问题 I am writing some test application to write some text into a text file using StreamWriter. While executing the WriteLine method system shutdown abruptly. After rebooting the machine have observed that there are many NUL characters at the end of file. Have searched many sites including MSDN I didn't found the solution for this problem. Could any one help me to resolve this problem. This can be easily reproducible if we do the following steps: Create WindowsApplication and place a button

How to shutdown an android application?

喜夏-厌秋 提交于 2020-01-04 02:45:30
问题 How to shutdown an android application? I don't find a shutdown command to application object. I want to shutdown and restart in case of some critical error. 回答1: If there is some kind of "critical error", then you should should deal with it in your code rather then trying to restart the application. You cannot shutdown an application in Android, however once all of your Activities are closed (which you can programatically do with the Activity.finish() method), then your application is

What exactly does “shutdown -y” do? [closed]

只谈情不闲聊 提交于 2020-01-02 03:31:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I tried some random parameters after the shutdown command in PowerShell 2.0 when I stumbled upon shutdown -y . All it seems to do is log out the user. if any other random letter is used (that isn't a valid parameter) nothing happens. For example: shutdown -b My question is: Does shutdown -y do anything special?