Как я могу запустить свое приложение перед входом в систему VB.NET
Hi guys so my question is how would i make my vb net program start before login and i know someones going to say well make a windows service but I've tried and my code doesn't work for some reason. So does anyone know how i make the code that ill put below into a file system watcher its for a md5 monitoring program so i can stop certain files from entering my computer a little of a do it myself thing heres some of the code the only part that im having problems with no errors just dont work in a windows service application.
Private Sub FileSystemWatcher1_Changed(sender As Object, e As FileSystemEventArgs) Handles FileSystemWatcher1.Changed Dim abc As New Service1() Try abc.Labellastreal.Text = e.FullPath ListBox3.Items.Add(abc.Labellastreal.Text) abc.OpenFileDialog3.FileName = "" Dim scanbox As New TextBox scanbox.Text = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\Database\VirusList.dat").ToString Dim md5 As New MD5CryptoServiceProvider Dim f As New FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read, &H2000) md5.ComputeHash(f) Dim hash As Byte() = md5.Hash Dim buff As New StringBuilder Dim hashByte As Byte For Each hashByte In hash buff.Append(String.Format("{0:X2}", hashByte)) Next f.Close() If scanbox.Text.Contains(buff.ToString) Then Me.OpenFileDialog3.FileName = e.FullPath file.delete(Labellastreal.Text) End If Catch exception1 As Exception ProjectData.SetProjectError(exception1) Dim ex As Exception = exception1 ProjectData.ClearProjectError() End Try End Sub
and obviously theres a filesystem watcher event for created and renamed.
Что я уже пробовал:
я пробовал все несколько разных вещей, но в настоящее время хочу/ задаюсь вопросом, Может ли кто-нибудь помочь с услугами. Овации.