I find solutions to your business. For a FREE consultation call/text me at (909)742-9133.
|
|
Forum Index ยป Questions & Answers | | Need a code to run an EXE-File | [Guest]
| Posted on 5/29/2018 6:25:11 PM 2367 days ago | Dear Admin Private Sub Command1_Click() program1 = "C:\Program Files\VNetKeys\VNetKeys.exe" On Error GoTo err: x% = Shell(program1, 1) NoFreeze% = DoEvents() Exit Sub err: If err.Number = 6 Then Exit Sub MsgBox "Please make sure you have the correct path and Then try again." End Sub That's a code to run an EXE file if you got the path, now my question is... how can i run a file in a folder that i've created ?? like Folder\Programs\Program.exe I wanna create a file to run portable Program with an USB stick. can you please help ? cause there a some problems with different computers like, some recognize the USB stick as Drive D, some with Drive E F G H. |
| VNFox
Administrator | Posted on 5/30/2018 4:54:36 PM 2366 days ago | This looks like the VB6 program. I think all you need to change is: program1 = "C:\Program Files\VNetKeys\VNetKeys.exe" to whatever path or program that you got. |
| |
|
|