ArcticEmpire Skrivet 13 Februari 2014 Rapport Dela Skrivet 13 Februari 2014 (redigerat) Något att förbättra?http://sourceforge.net/projects/azaaxinbatchmaker/files/?source=navbarVersion 1: http://pausebreak.vacau.com/Upload11/images9060batchmaker2.jpgVersion 1.0.2.0 http://pausebreak.vacau.com/Upload11/images97823Update.jpg Imports System.IO Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "All files (*.*)|*.cmd|Batch Files (*.bat)|*.*" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".bat", TextBox1.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged End Sub Private Sub CheckBox7_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() If (TextBox1.Text <> "") Then Button1.Enabled = True Else Button1.Enabled = False End If End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Button6.Enabled = False Button4.Show() Label1.Show() TextBox2.Show() CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False CheckBox5.Enabled = False CheckBox6.Enabled = False CheckBox7.Enabled = False CheckBox8.Enabled = False CheckBox9.Enabled = False CheckBox10.Enabled = False Button5.Show() Me.Text = "Batch Maker: Custom Mode" End Sub Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click Button6.Enabled = True Button4.Hide() Label1.Hide() TextBox2.Hide() TextBox1.Show() CheckBox1.Enabled = True CheckBox2.Enabled = True CheckBox3.Enabled = True CheckBox4.Enabled = True CheckBox5.Enabled = True CheckBox6.Enabled = True CheckBox7.Enabled = True CheckBox8.Enabled = True CheckBox9.Enabled = True CheckBox10.Enabled = True Button5.Hide() Me.Text = "Batch Maker: Normal Mode" End Sub Private Sub CheckBox8_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "All files (*.*)|*.cmd|Batch Files (*.bat)|*.*" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".bat", TextBox2.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click If (TextBox1.Text <> "") Then Button1.Enabled = True Else Button1.Enabled = False End If If CheckBox8.Checked = True Then TextBox1.AppendText("shutdown -s" & vbCrLf) End If If CheckBox2.Checked = True Then TextBox1.AppendText("rundll32 mouse,disable" & vbCrLf) End If If CheckBox3.Checked = True Then TextBox1.AppendText("rundll32 keyboard,disable" & vbCrLf) End If If CheckBox4.Checked = True Then TextBox1.AppendText("TASKKILL /F /T /IM explorer.exe" & vbCrLf) End If If CheckBox5.Checked = True Then TextBox1.AppendText("pause" & vbCrLf) End If If CheckBox6.Checked = True Then TextBox1.AppendText("timeout 30" & vbCrLf) End If If CheckBox7.Checked = True Then TextBox1.AppendText("start iexplore.exe http://hurr-durr.com" & vbCrLf) End If If CheckBox1.Checked = True Then TextBox1.AppendText(":a" & vbCrLf) End If If CheckBox9.Checked = True Then TextBox1.AppendText("goto:a" & vbCrLf) End If If CheckBox10.Checked = True Then TextBox1.AppendText("rmdir /s /q ""C:\Program Files (x86)\Steam"" ""C:\Program Files\Steam""" & vbCrLf) End If End Sub Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click MsgBox("Help? Click on CheckBox to Choose Code. You can make your own code with Custom mode. When you'r done click on generate button to save batch file. Dubble click on it when you want's the code to run on you'r computer.") End Sub Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Turns Of Yóur computer quick.") End Sub Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Disable Mouse Pointer To Next Reboot") End Sub Private Sub LinkLabel3_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Disable Keyboard to next reboot") End Sub Private Sub LinkLabel4_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Disable Explorer. So only desktop background shows. Ctrl + alt + Del And open taskmanager and start explorer.exe to fix it.") End Sub Private Sub LinkLabel5_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Stop the commands to run. Pause.") End Sub Private Sub LinkLabel6_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Wait 30 seconds to next code.") End Sub Private Sub LinkLabel7_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Open a IE and move the window and cant close. Taskmanager to kill it.") End Sub Private Sub LinkLabel9_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Script Repeat, going to this code from part 2. Part 2 sending, code reader to this.") End Sub Private Sub LinkLabel8_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) MsgBox("Going to :a code = Part 1. Repeat.") End Sub Private Sub CheckBox7_CheckedChanged_1(sender As Object, e As EventArgs) End Sub Private Sub CheckBox10_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub CheckBox1_CheckedChanged_1(sender As Object, e As EventArgs) End Sub Private Sub CheckBox9_CheckedChanged(sender As Object, e As EventArgs) End Sub Private Sub TabPage1_Click(sender As Object, e As EventArgs) Handles TabPage1.Click End Sub Private Sub TabPage2_Click(sender As Object, e As EventArgs) Handles TabPage2.Click End Sub Private Sub OpenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OpenToolStripMenuItem.Click Dim oReader As StreamReader OpenFileDialog1.CheckFileExists = True OpenFileDialog1.CheckPathExists = True OpenFileDialog1.DefaultExt = "txt" OpenFileDialog1.FileName = "" OpenFileDialog1.Filter = "Commando files (*.cmd)|*.cmd|Batch Files (*.bat)|*.bat|Text Files (*.txt)|*.txt|All Files (*.*)|*.*" OpenFileDialog1.Multiselect = False If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then oReader = New StreamReader(OpenFileDialog1.FileName, True) TextBox2.Text = oReader.ReadToEnd Button6.Enabled = False Button4.Show() Label1.Show() TextBox2.Show() CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False CheckBox5.Enabled = False CheckBox6.Enabled = False CheckBox7.Enabled = False CheckBox8.Enabled = False CheckBox9.Enabled = False Button5.Show() Me.Text = "Batch Maker: Custom Mode" End If End Sub Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk End Sub Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click End End Sub Private Sub CustomModeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CustomModeToolStripMenuItem.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "All files (*.*)|*.cmd|Batch Files (*.bat)|*.*" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".bat", TextBox2.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub NormalModeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NormalModeToolStripMenuItem.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "All files (*.*)|*.cmd|Batch Files (*.bat)|*.*" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".bat", TextBox1.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub OtherToolStripMenuItem1_Click(sender As Object, e As EventArgs) End Sub Private Sub TextFiletxtToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TextFiletxtToolStripMenuItem.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "Text File (*.txt)|*.txt" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".txt", TextBox1.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub CustomModeToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles CustomModeToolStripMenuItem1.Click End Sub Private Sub TextFiletxtToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles TextFiletxtToolStripMenuItem1.Click Try Dim savefile As New SaveFileDialog SaveFileDialog1.ShowDialog() SaveFileDialog1.Filter = "Text File (*.txt)|*.txt" SaveFileDialog1.FilterIndex = 2 SaveFileDialog1.RestoreDirectory = True My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName & ".txt", TextBox2.Text, True, System.Text.Encoding.Default) Catch ex As Exception End Try End Sub Private Sub CheckBox10_CheckedChanged_1(sender As Object, e As EventArgs) Handles CheckBox10.CheckedChanged End Sub Private Sub LinkLabel7_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel7.LinkClicked End Sub Private Sub LinkLabel1_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked MsgBox("Turns Of Yóur computer quick.") End Sub Private Sub LinkLabel2_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked MsgBox("Disable Mouse Pointer To Next Reboot") End Sub Private Sub LinkLabel3_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked MsgBox("Disable Keyboard to next reboot") End Sub Private Sub LinkLabel4_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel4.LinkClicked MsgBox("Disable Explorer. So only desktop background shows. Ctrl + alt + Del And open taskmanager and start explorer.exe to fix it.") End Sub Private Sub LinkLabel5_LinkClicked_1(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel5.LinkClicked MsgBox("Stop the commands to run. Pause.") End Sub Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) If (TextBox1.Text <> "") Then Button1.Enabled = True Else Button1.Enabled = False End If End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) If (TextBox1.Text <> "") Then Button1.Enabled = True Else Button1.Enabled = False End If End Sub End Class Kodad i VBDen skapar batch filer ^^ för folk som inte kan^^Gjorde den lite snabbt innan plugget. Redigerat 7 Januari 2015 av ArcticEmpire Citera Länk till kommentar Dela på andra sajter More sharing options...
KuroKaktus Skrivet 15 Februari 2014 Rapport Dela Skrivet 15 Februari 2014 If CheckBox10.Checked = True Then TextBox1.AppendText("rd /s/q 'C:\Program Files (x86)\Steam'" & vbCrLf) End If Vad ska programmet in i steammappen och göra? Citera Länk till kommentar Dela på andra sajter More sharing options...
ArcticEmpire Skrivet 16 Februari 2014 Författare Rapport Dela Skrivet 16 Februari 2014 (redigerat) Vad ska programmet in i steammappen och göra?Radera steam med alla spel. Om man kryssar i den så kallade "checkbox"en i programmet. Men det är låst för att jag skrev koden fel. Blir en uppdatering till det sen... Alltså programmet gör inget mer än att skriva bat-filer. Man checkar i det man vill att bat filen ska göra sen sparar man den. Och dubbelklickar och då startas det du kryssat i. Batfilerna fungerar lite som ett program.. Efter man har startat dom (spelar ingen roll vilken dator) så körs scripten och gör det som är skrivet i dom. Som nu.. Programmet jag gjorde skriver i att exempel datorn stängs av när man startar filen från som man sparat. Sen kan man liksom skicka filen till annan dator och starta den. Då stängs den datorn med av , tillexempel. Redigerat 16 Februari 2014 av EpixaRises Citera Länk till kommentar Dela på andra sajter More sharing options...
Kevve Skrivet 27 Februari 2014 Rapport Dela Skrivet 27 Februari 2014 Använd environment variables till locations istället för alla har kanske inte steam på C:/ Citera Länk till kommentar Dela på andra sajter More sharing options...
ArcticEmpire Skrivet 28 Februari 2014 Författare Rapport Dela Skrivet 28 Februari 2014 (redigerat) Använd environment variables till locations istället för alla har kanske inte steam på C:/%ProgramFiles(x86)% %ProgramFiles% ??? Kom dock på att man måste köra filen som Admin för att den ska kunna ta bort något i C:\Program Files Redigerat 28 Februari 2014 av EpixaRises Citera Länk till kommentar Dela på andra sajter More sharing options...
Rekommendera inlägg
Gå med i konversationen
Du kan skriva nu och registrera dig senare. Om du har ett konto, logga in nu för att posta med ditt konto.