need help with loader

Posts 1–2 of 2 · Page 1 of 1
need help with loader
hey all, whenever I start my program and get through the login process you are able to click a button and it will run a executable that is located in the resources. I have it set to where it saves in the local cache but I don't want it to save on the computer at all or if it does for it not to be visible or be found. Also I want it to start the program as admin as thats the main problem right now that I can't get it to start as admin, here is the current code that I use. any help is appreciated


Code:
Public Class Form3
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim dir As String = My.Computer.FileSystem.SpecialDirectories.Temp
        Dim filename As String = dir + "r8avO7LcjJ.exe"
        IO.File.WriteAllBytes(filename, My.Resources.r8avO7LcjJ)
        Process.Start(filename)

    End Sub

    Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
Quote Originally Posted by UNDEAD NOOB View Post
hey all, whenever I start my program and get through the login process you are able to click a button and it will run a executable that is located in the resources. I have it set to where it saves in the local cache but I don't want it to save on the computer at all or if it does for it not to be visible or be found. Also I want it to start the program as admin as thats the main problem right now that I can't get it to start as admin, here is the current code that I use. any help is appreciated


Code:
Public Class Form3
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim dir As String = My.Computer.FileSystem.SpecialDirectories.Temp
        Dim filename As String = dir + "r8avO7LcjJ.exe"
        IO.File.WriteAllBytes(filename, My.Resources.r8avO7LcjJ)
        Process.Start(filename)

    End Sub

    Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
Code:
Dim process As System.Diagnostics.Process = Nothing
Dim processStartInfo As System.Diagnostics.ProcessStartInfo
processStartInfo = New System.Diagnostics.ProcessStartInfo()
processStartInfo.FileName = My.Computer.FileSystem.SpecialDirectories.Desktop & "\programtostart.exe"
processStartInfo.Verb = "runas"

 processStartInfo.Arguments = ""
processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
processStartInfo.UseShellExecute = True
 process = System.Diagnostics.Process.Start(processStartInfo)
try this it's not my work but it should do the job for you.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?