当前位置:首页 » 网页前端 » 脚本让电脑重启
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

脚本让电脑重启

发布时间: 2022-10-11 22:18:14

❶ 运行脚本后电脑重启

最好你换个脚本,或者运行脚本时把杀毒和防火墙关掉。

❷ 写一个自动重启.bat脚本,并不是重启电脑哦

不清楚你的实际文件/情况,仅以问题中的样例/说明为据;以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI
@echo off
rem bat间歇性重新运行
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set sleep=1800
:loop
>"tmp.bat" echo;title #mark#
>>"tmp.bat" echo;php "%~dp0A.php"
start "" "tmp.bat"
timeout /t %sleep% /nobreak
for /f "tokens=2 delims=," %%a in ('tasklist /fi "imagename eq cmd.exe" /v /fo csv^|find "#mark#"') do taskkill /f /pid %%a /t
goto loop

❸ 简单游一点击启动脚本电脑就重启,怎么回事怎么解决

估计是杀毒软件造成的,一点启动,杀毒软件要控制。但是不重启又处理不了。所以自动重启了

❹ 如何用bat命令重启电脑或关机

关闭计算机

shutdown/s/t0

重启计算机

shutdown/r/t0

用法:

  1. /s 为关闭计算机参数开关

  2. /r 为关机计算机并重启计算机

  3. /t 可以理解为关闭等待的时间,0等于不等待,10等于在关闭前等待10秒在关闭计算机

❺ 谁会写一个脚本程序,双击重启电脑的那种

去bat吧,那里面有

❻ 怎么写个脚本 然用户在打开某个软件的时候电脑自动重启呢

把下面这行保存成,"重启.bat'文件即可
shutdown -r -t 0

这个要自己写一个hook。每次创建进程是你都知道是那个程序,看到不喜欢的程序你就可以从新启动了。

这里有网络介绍
http://ke..com/view/1208620.htm#sub1208620

这里有msdn介绍
SetWindowsHookEx Function

--------------------------------------------------------------------------------

The SetWindowsHookEx function installs an application-defined hook procere into a hook chain. You would install a hook procere to monitor the system for certain types of events. These events are associated either with a specific thread or with all threads in the same desktop as the calling thread.

Syntax

HHOOK SetWindowsHookEx( int idHook,
HOOKPROC lpfn,
HINSTANCE hMod,
DWORD dwThreadId
);
Parameters

idHook
[in] Specifies the type of hook procere to be installed. This parameter can be one of the following values.
WH_CALLWNDPROC
Installs a hook procere that monitors messages before the system sends them to the destination window procere. For more information, see the CallWndProc hook procere.
WH_CALLWNDPROCRET
Installs a hook procere that monitors messages after they have been processed by the destination window procere. For more information, see the CallWndRetProc hook procere.
WH_CBT
Installs a hook procere that receives notifications useful to a computer-based training (CBT) application. For more information, see the CBTProc hook procere.
WH_DEBUG
Installs a hook procere useful for debugging other hook proceres. For more information, see the DebugProc hook procere.
WH_FOREGROUNDIDLE
Installs a hook procere that will be called when the application's foreground thread is about to become idle. This hook is useful for performing low priority tasks ring idle time. For more information, see the ForegroundIdleProc hook procere.
WH_GETMESSAGE
Installs a hook procere that monitors messages posted to a message queue. For more information, see the GetMsgProc hook procere.
WH_JOURNALPLAYBACK
Installs a hook procere that posts messages previously recorded by a WH_JOURNALRECORD hook procere. For more information, see the JournalPlaybackProc hook procere.
WH_JOURNALRECORD
Installs a hook procere that records input messages posted to the system message queue. This hook is useful for recording macros. For more information, see the JournalRecordProc hook procere.
WH_KEYBOARD
Installs a hook procere that monitors keystroke messages. For more information, see the KeyboardProc hook procere.
WH_KEYBOARD_LL
Windows NT/2000/XP: Installs a hook procere that monitors low-level keyboard input events. For more information, see the LowLevelKeyboardProc hook procere.
WH_MOUSE
Installs a hook procere that monitors mouse messages. For more information, see the MouseProc hook procere.
WH_MOUSE_LL
Windows NT/2000/XP: Installs a hook procere that monitors low-level mouse input events. For more information, see the LowLevelMouseProc hook procere.
WH_MSGFILTER
Installs a hook procere that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. For more information, see the MessageProc hook procere.
WH_SHELL
Installs a hook procere that receives notifications useful to shell applications. For more information, see the ShellProc hook procere.
WH_SYSMSGFILTER
Installs a hook procere that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. The hook procere monitors these messages for all applications in the same desktop as the calling thread. For more information, see the SysMsgProc hook procere.
lpfn
[in] Pointer to the hook procere. If the dwThreadId parameter is zero or specifies the identifier of a thread created by a different process, the lpfn parameter must point to a hook procere in a dynamic-link library (DLL). Otherwise, lpfn can point to a hook procere in the code associated with the current process.
hMod
[in] Handle to the DLL containing the hook procere pointed to by the lpfn parameter. The hMod parameter must be set to NULL if the dwThreadId parameter specifies a thread created by the current process and if the hook procere is within the code associated with the current process.
dwThreadId
[in] Specifies the identifier of the thread with which the hook procere is to be associated. If this parameter is zero, the hook procere is associated with all existing threads running in the same desktop as the calling thread.
Return Value

If the function succeeds, the return value is the handle to the hook procere.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

SetWindowsHookEx can be used to inject a DLL into another process. A 32-bit DLL cannot be injected into a 64-bit process, and a 64-bit DLL cannot be injected into a 32-bit process. If an application requires the use of hooks in other processes, it is required that a 32-bit application call SetWindowsHookEx to inject a 32-bit DLL into 32-bit processes, and a 64-bit application call SetWindowsHookEx to inject a 64-bit DLL into 64-bit processes. The 32-bit and 64-bit DLLs must have different names.

An error may occur if the hMod parameter is NULL and the dwThreadId parameter is zero or specifies the identifier of a thread created by another process.

Calling the CallNextHookEx function to chain to the next hook procere is optional, but it is highly recommended; otherwise, other applications that have installed hooks will not receive hook notifications and may behave incorrectly as a result. You should call CallNextHookEx unless you absolutely need to prevent the notification from being seen by other applications.

Before terminating, an application must call the UnhookWindowsHookEx function to free system resources associated with the hook.

The scope of a hook depends on the hook type. Some hooks can be set only with global scope; others can also be set for only a specific thread, as shown in the following table.

Hook Scope
WH_CALLWNDPROC Thread or global
WH_CALLWNDPROCRET Thread or global
WH_CBT Thread or global
WH_DEBUG Thread or global
WH_FOREGROUNDIDLE Thread or global
WH_GETMESSAGE Thread or global
WH_JOURNALPLAYBACK Global only
WH_JOURNALRECORD Global only
WH_KEYBOARD Thread or global
WH_KEYBOARD_LL Global only
WH_MOUSE Thread or global
WH_MOUSE_LL Global only
WH_MSGFILTER Thread or global
WH_SHELL Thread or global
WH_SYSMSGFILTER Global only

For a specified hook type, thread hooks are called first, then global hooks.

The global hooks are a shared resource, and installing one affects all applications in the same desktop as the calling thread. All global hook functions must be in libraries. Global hooks should be restricted to special-purpose applications or to use as a development aid ring application debugging. Libraries that no longer need a hook should remove its hook procere.

Windows 95/98/Me: SetWindowsHookEx is supported by the Microsoft Layer for Unicode (MSLU). However, it does not make conversions. To see Unicode messages, notifications, and so forth, you must subclass the window. To use this version of the application programming interface (API), you must add certain files to your application, as outlined in Installing and Releasing Hook Proceres.

Example

For an example, see Installing and Releasing Hook Proceres.

Function Information

Minimum DLL Version user32.dll
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as ANSI and Unicode versions.

See Also

Hooks Overview, CallNextHookEx, CallWndProc, CallWndRetProc, CBTProc, DebugProc, ForegroundIdleProc, GetMsgProc, JournalPlaybackProc, JournalRecordProc, LowLevelKeyboardProc, LowLevelMouseProc, KeyboardProc, MouseProc, MessageProc, ShellProc, SysMsgProc, UnhookWindowsHookEx

❼ 电脑自动重启命令

电脑自动重启命令是shutdown -r -t xxx(t后方的是进行重启的时间,单位为秒)。

电脑上执行自动重启的具体操作步骤如下:

1、首先在电脑的桌面上点击键盘上的“windows+r”组合键,然后就可以调出运行对话框。