Custom Launch for exe's? Need help
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Hello,
Your welcome Esky thats what we are here for ;). Also makes us feel good when we can help someone out, especially when you have been searching for so long.
Happy coding! cooll;
Your welcome Esky thats what we are here for ;). Also makes us feel good when we can help someone out, especially when you have been searching for so long.
Happy coding! cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
I have a quick question, What would that command be for starting the file from a resource? Same concept. But this code here makes a temporary folder and then runs the .exe file from an embedded resource and it then deletes the temporary file when it is closed... But I am thinking... Combine the 2 for even more fun! Can it be done?! I don't know but I bet we will see! I am going to get on this immediately obviously. I will post if I come up with anything by morning... its only 1 a.m. Just another thought, I would like to see the \tempFOLDER be able to be buried in the windows folder somewhere like "c:\windows\OldFiles\Unused\Crap\Who\What\When\Where\How\"
_______________________________________________________________________________________________
Dim tempFolder As String = Application.StartupPath & "\TempFOLDER" ' change to whatever folder you like
Dim tempName As String = tempFolder & "\FILENAME.exe" ' your filename in your resource folder
If My.Computer.FileSystem.DirectoryExists(tempFolder) Then
My.Computer.FileSystem.DeleteDirectory(tempFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(tempFolder)
System.IO.File.WriteAllBytes(tempName, My.Resources.RESOURCENAMEHERE) ' Change to your resource use _ for spaces.
Shell(tempName, AppWinStyle.NormalFocus, True)
My.Computer.FileSystem.DeleteDirectory(tempFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
End Sub
_____________________________________________________________________________________________
( I edited out my information if you were wondering. )
Happy Coding!! I hope this code helps out!! If anyone is able to use this code to combine the two and post it back to me in a PM or on here that would be wonderful! Thanks everyone!
_______________________________________________________________________________________________
Dim tempFolder As String = Application.StartupPath & "\TempFOLDER" ' change to whatever folder you like
Dim tempName As String = tempFolder & "\FILENAME.exe" ' your filename in your resource folder
If My.Computer.FileSystem.DirectoryExists(tempFolder) Then
My.Computer.FileSystem.DeleteDirectory(tempFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(tempFolder)
System.IO.File.WriteAllBytes(tempName, My.Resources.RESOURCENAMEHERE) ' Change to your resource use _ for spaces.
Shell(tempName, AppWinStyle.NormalFocus, True)
My.Computer.FileSystem.DeleteDirectory(tempFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
End Sub
_____________________________________________________________________________________________
( I edited out my information if you were wondering. )
Happy Coding!! I hope this code helps out!! If anyone is able to use this code to combine the two and post it back to me in a PM or on here that would be wonderful! Thanks everyone!
easiest way to open some kind of a program is:
Add a button
Add a Textbox
double click button1
Shell(textbox1.text)
Process.start(textbox1.text)
Add a button
Add a Textbox
double click button1
Shell(textbox1.text)
Process.start(textbox1.text)
Hi guys, im new in this forum. Im doing my own custom launcher, but it has failed. I have tried to use some of the codes provided here but it doesnt work. Im using Visuall studio c# 2010.
I want to make a form, that launches other program.
May i have your opinions?
I want to make a form, that launches other program.
May i have your opinions?
mdw wrote:Hi guys, im new in this forum. Im doing my own custom launcher, but it has failed. I have tried to use some of the codes provided here but it doesnt work. Im using Visuall studio c# 2010.Hey dude you bumped :P
I want to make a form, that launches other program.
May i have your opinions?
the easiest way is just
On button click
Shell(textbox.text)
Axel wrote:dont get me wrong, but i only started to write a program for few months. still have a lot to learn. erghhmdw wrote:Hi guys, im new in this forum. Im doing my own custom launcher, but it has failed. I have tried to use some of the codes provided here but it doesnt work. Im using Visuall studio c# 2010.Hey dude you bumped :P
I want to make a form, that launches other program.
May i have your opinions?
the easiest way is just
On button click
Shell(textbox.text)
btw, the error shows "Shell does not exist in the current context"
For Shell to work the compiler needs to reference Microsoft.VisualBasic. You could also use Process.Start instead.
Does your launcher need to contain/extract the program or is it being launched from a file?
Does your launcher need to contain/extract the program or is it being launched from a file?
actually, i want to run an application by using my form. the application is already installed in my computer.
my form is the main interface so the user only need to click a button in order to launch the application.
my form is the main interface so the user only need to click a button in order to launch the application.
Copyright Information
Copyright © Codenstuff.com 2020 - 2023