⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reboot.txt

📁 Script C被设计成一种解释执行的、C语言风格的脚本语言。它用来完成bat批处理无法完成
💻 TXT
字号:

#include "c:\ats\samples\ini.txt"
int EWX_LOGOFF = 0;
int EWX_SHUTDOWN = 1;	//NT: needs SE_SHUTDOWN_NAME privilege (no def prompt)
int EWX_REBOOT = 2;	//NT: needs SE_SHUTDOWN_NAME privilege
int EWX_FORCE = 4;
int EWX_POWEROFF = 8;	//NT: needs SE_SHUTDOWN_NAME privilege
int shrsExitNoDefPrompt = 1;
int shrsRebootSystem = 2;	// = EWX_REBOOT


function RebootAndRun(string Program, string Username, string Password, String Domain, int n)
begin
  int i;
  string space=" ";
  string IniFileName="c:\round.ini";

  i=IniFile_GetInt(IniFileName,Program,"RunCount",0);
  i = i+1;
  if (i>=n)
  begin
    Reg_DeleteValue( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\RunServices", "Autologin");
    Reg_DeleteValue( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "ATS");
    Sleep(5000);
    DeleteFile(IniFileName);
  end
  else
  begin
    IniFile_Create(IniFileName);
    IniFile_SetInt(IniFileName, Program, "Total", n);
    IniFile_SetInt(IniFileName,Program,"RunCount",i);
    Open( "..\tools\login.exe", Username+space+Password+space+Domain);
    Reg_SetStr( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "ATS", Program);
//    ShellRestartSystem(0,"Hahaha! ",7);
//    ShellShutDown(0);
//    Restart();
    Sleep(10000);
    Press("Enter");
  end
end

function Reboot(string Program, int n, string IniFileName)
begin
  int i;
  string space=" ";


  i=IniFile_GetInt(IniFileName,Program,"RunCount",0);
  i = i+1;
  if (i>=n)
  begin
    Reg_DeleteValue( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "ATS");
    Sleep(5000);
    DeleteFile(IniFileName);
  end
  else
  begin
    IniFile_Create(IniFileName);
    IniFile_SetInt(IniFileName, Program, "Total", n);
    IniFile_SetInt(IniFileName,Program,"RunCount",i);
    Reg_SetStr( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "ATS", Program);
    Open("c:\ats\tools\reboot.exe", "2 5000");
  end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -