Hi,

I need help with Resource files....

That i need to do is running file that i have put in the resource files (exe file)
So the idea of this when i click the button the file that i have put run so it cant be happen with shell.

is there's any idea to do that?

Thanks in advance

See if this helps.

Dim myFileName As String = "C:\test.exe"
        IO.File.WriteAllBytes(myFileName, My.Resources.testApp)
        If IO.File.Exists(myFileName) Then Process.Start(myFileName)
Comments
thanks

See if this helps.

Dim myFileName As String = "C:\test.exe"
        IO.File.WriteAllBytes(myFileName, My.Resources.testApp)
        If IO.File.Exists(myFileName) Then Process.Start(myFileName)

Thanks so much it helped me so much,

But i wondering if there way to run it without add in C:\ ?

Edited 5 Years Ago by xxxferraxxx: n/a

You can save the file to AppData or LocalAppData Folder.
Those folders are there for such reasons and do not need any administrator permissions on non-administrator systems.

Dim myLocalAppDataFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
        Process.Start(myLocalAppDataFolder)

I would create a Folder just for my application in either one of those folders and use it as needed.

You can save the file to AppData or LocalAppData Folder.
Those folders are there for such reasons and do not need any administrator permissions on non-administrator systems.

Dim myLocalAppDataFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
        Process.Start(myLocalAppDataFolder)

I would create a Folder just for my application in either one of those folders and use it as needed.

Thank you so much bro helped me :)

This question has already been answered. Start a new discussion instead.