導航:首頁 > 編程語言 > 如何發給別人關機程序

如何發給別人關機程序

發布時間:2023-02-19 08:15:52

Ⅰ 如何在qq上給別人發系統關機

shutdown -s -t 2100(時間哈)
把它用TXT 寫入
再重命名也BAT文件(禮物.bat)
發QQ好友 ta 一雙擊 就過2100秒 自動關機
shutdown -a (即可結束關機操作)
(想再詳細 就網路DOS命令哈 呵呵 )

Ⅱ 怎麼製造一個發給別人別人就自動關機的軟體

用VB寫:Imports System.Diagnostics

Public Class 設置窗體
Private shutTime As String '關機時間的字元串
Private IsToday As Boolean = True '判斷是否是今天的變數
Private delay As Integer '延時多少秒放關機
Private lastTime As Integer '關機的倒計時
Private action As String '關機或重啟或注銷
Private shellText As String '執行的命令字元串
Private firstShow As Boolean = True
Private SysTime As Boolean = False
Private autoHide As Boolean = True '啟動自動隱藏
Private TotalData As New System.Diagnostics.PerformanceCounter("Network Interface", "Bytes Total/sec", "MS TCP Loopback interface")
Private proTime As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total")

'雙擊右下角的圖標的響應事件
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
If (Me.Visible = False) Then
Me.Show()
End If
End Sub

'重載窗體的關閉事件,使窗體隱藏
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True '取消窗體的關閉動作
delayTime.Value = delay '還原delayTime控制項的值
StrToItems() '還原ListBox的值
Me.Hide()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.SelectedIndex = 2 '設置默認選項 "每天"
ComboBox2.SelectedIndex = 4 '設置默認選項 "關機"
Timer1.Start()
readReg() '讀取存放在注冊表的信息
StrToItems() '把字元串的信息讀取到ListBox
delayTime.Value = delay '把延時時間讀取到delayTime控制項
DateTimePicker1.Value = Today
End Sub

Private Sub 退出程序ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 退出程序ToolStripMenuItem.Click
Me.Dispose()
End Sub

Private Sub 立即取消關機ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 立即取消關機ToolStripMenuItem1.Click
Timer2.Stop()
取消窗體.Close()
Shell("shutdown -a")
Timer1.Start()
End Sub

Private Sub 設置關機計劃ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 設置關機計劃ToolStripMenuItem.Click
If Me.Visible = False Then
Me.Show()
End If
End Sub

'點擊確定按鈕的事件處理
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

'判斷是否要開機自動運行
If autoCheck.Checked Then
創建開機自動運行()
Else
刪除開機自動運行()
End If

If Me.HideCheck.Checked Then
autoHide = True
Else
autoHide = False
End If

If Me.regCheck.Checked Then
禁止修改注冊表()
Else
取消禁止修改注冊表()
End If

If Me.ManCheck.Checked Then
禁止使用任務管理器()
Else
取消禁止使用任務管理器()
End If

If Me.SysTimeCheck.Checked Then
SysTime = True
Else
SysTime = False
End If
'四捨五入delayTime控制項的值
delay = Math.Round(delayTime.Value, MidpointRounding.AwayFromZero)
Me.Hide()
ItemsToStr() '把listBox的信息保存到字元串中
writeReg() '把字元串保存把注冊表中
End Sub

'取消按鈕事件
Private Sub canelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles canelButton.Click
StrToItems() '還原ListBox的值
delayTime.Value = delay '還原delayTime控制項的值
Me.Hide()
End Sub

'點擊添加按鈕
Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click
Dim tempStr As String = ""
If ComboBox1.Items.Item(ComboBox1.SelectedIndex) = "指定日期" Then
tempStr = DateTimePicker1.Value.ToShortDateString
Else
tempStr = ComboBox1.SelectedItem
End If
tempStr &= "," & CStr(Math.Round(hourNum.Value, MidpointRounding.AwayFromZero)) & ":" & CStr(Math.Round(minNum.Value, MidpointRounding.AwayFromZero)) & ":" & CStr(Math.Round(secNum.Value, MidpointRounding.AwayFromZero)) & ","
Select Case ComboBox2.SelectedItem
Case "打開網址"
tempStr &= "打開網址" & "[" & TextBox1.Text.Replace(";", ";").Replace(":", ":") & "]"
Case "提醒信息"
tempStr &= "提醒信息" & "[" & TextBox1.Text.Replace(";", ";").Replace(":", ":") & "]"
Case "打開文件"
tempStr &= "打開文件" & "[" & TextBox1.Text.Replace(";", ";").Replace(":", ":") & "]"
Case Else
tempStr &= ComboBox2.SelectedItem
End Select
ListBox1.Items.Add(tempStr)
End Sub

'點擊清除按鈕
Private Sub clearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearButton.Click
ListBox1.Items.Clear()
End Sub

'把ListBox的值保存到字元串ShutTime
Private Sub ItemsToStr()
Dim i As Integer
shutTime = ""
For i = 0 To ListBox1.Items.Count - 1
'把ListBox中的各項連接到shutTime
shutTime &= ListBox1.Items.Item(i) & ";"
Next
If shutTime <> "" Then
'去除最後一個 ";"
shutTime = Mid(shutTime, 1, shutTime.Length - 1)
End If
End Sub

'把字元串ShutTime的值還原到ListBox
Private Sub StrToItems()
If shutTime <> "" Then '如果shutTime有保存信息
Dim temp() As String = shutTime.Split(";") 'temp字元串數組存放shutTime以";"分隔的各個字元子串
Dim t As String 't存放temp字元串數組的一項
ListBox1.Items.Clear()
For Each t In temp
If Not (Mid(t, 1, 2) = "今天" And Not IsToday) Then '如果今天還沒過了
ListBox1.Items.Add(t)
End If
Next
End If
End Sub

'讀取注冊表保存的信息
Private Sub readReg()
Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey
Try
key = Microsoft.Win32.Registry.LocalMachine
subkey = key.OpenSubKey("SOFTWARE\AutoShutdown")
shutTime = subkey.GetValue("time")
delay = CInt(subkey.GetValue("delayTime"))
autoHide = subkey.GetValue("autoHide")
If (CStr(Today()) <> subkey.GetValue("day")) Then
IsToday = False
End If
Catch ex As Exception
shutTime = ""
IsToday = True
End Try
End Sub

Private Sub 禁止修改注冊表()
Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.CurrentUser
subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system")
subkey.SetValue("disableregistrytools", 1)
End Sub

Private Sub 取消禁止修改注冊表()
Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.CurrentUser
subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system")
subkey.SetValue("disableregistrytools", 0)
End Sub

Private Sub 禁止使用任務管理器()
Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.CurrentUser
subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system")
subkey.SetValue("DisableTaskMgr", 1)
End Sub

Private Sub 取消禁止使用任務管理器()
Dim key As Microsoft.Win32.RegistryKey, subkey As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.CurrentUser
subkey = key.CreateSubKey("software\microsoft\windows\currentversion\policies\system")
subkey.SetValue("DisableTaskMgr", 0)
End Sub

Ⅲ 怎樣用c語言編寫使別人關機的程序並怎樣發給別人

#include <stdio.h>
#include <conio.h>

void main(void)
{
system("shutdown -s -t 1"); //1是指一秒實現關機
}
如果想耍別人,把程序發給他後也需要他去運行程序,他的電腦才能關機的,孩子

Ⅳ 如何編寫一個能通過QQ發送一個使對方關機的bat文件

看步驟 復制如下代碼 粘貼在記事本---保存為 xx.bat
@echo off
shutdown -s -t 0 -f

此文件發給他 他只要雙擊 立刻關機
有個問題是 如果對方QQ 安全級別設置為 高的 可能無法接受此文件
建議你 壓縮後 發給他 把xx.bat 添加到壓縮包發送

Ⅳ 如何用c語言讓別人手機關機

使用c語言實現手機關機功能是不可能的,因為c語言是一種通用編程語言,它只能用來編寫通用程序,而不能控制手機的硬體。

要想讓別人的手機關機,可以通過編寫一段代碼,將這段代碼發送到對方的手機,然後讓對方手動執行這段代碼來實現關機的功能。

Ⅵ 用易語言編了個關機程序,怎麼發給別人

用RAR壓縮包壓縮下,或者發送到自己的網盤 或 技論壇上!

Ⅶ 怎麼發送可以讓對方關機的文件

自己到網上找個軟體,發送給對方就好,對方一接受就關機了.

Ⅷ 怎樣用c語言編寫使別人關機的程序並怎樣發給別人

#include
<stdio.h>
#include
<conio.h>
void
main(void)
{
system("shutdown
-s
-t
1");
//1是指一秒實現關機
}
如果想耍別人,把程序發給他後也需要他去運行程序,他的電腦才能關機的,孩子

閱讀全文

與如何發給別人關機程序相關的資料

熱點內容
怎麼做編程入門 瀏覽:851
用織夢建手機網站 瀏覽:38
灌南數控編程怎麼學 瀏覽:957
系統apk圖標修改工具 瀏覽:121
蘋果6手機網路沒信號怎麼回事啊 瀏覽:378
手機掃描文件轉換成word 瀏覽:636
手機本地視頻的文件夾在哪裡 瀏覽:908
蘋果11無法安裝app找不到描述文件 瀏覽:363
咋新建cad文件 瀏覽:969
窩窩app怎麼樣自動關 瀏覽:228
蘋果電腦怎麼用wps生成多個文件夾 瀏覽:309
蘋果手機哪裡有賣 瀏覽:83
app登錄狀態為什麼不過期 瀏覽:160
win10創意者無法升級 瀏覽:59
如何查殺後門程序 瀏覽:498
定類數據可以用哪些描述統計方法 瀏覽:278
微信公眾號閱讀全文怎麼跳轉文件 瀏覽:935
迷你編程怎麼免費進入 瀏覽:354
蘋果應用設置密碼 瀏覽:21
windowsmac共享文件夾 瀏覽:274

友情鏈接