Restored from previous forum. Originally posted by DarthPuff.
ugh... hey i have an exe called Particles.exe in a folder called System thats in the same directory as the exe for the purebasic program... O_O but when i use the RunProgram("System/Particles.exe","","") it wont run... o_O why is that... i even tried putting a / before system and putting in the full name ... ex:... C:\My Documents\MySoftware\DarkHalf\Particles\v0.0.2\System\Particles.exe ... o_O this is the second alpha version of this program... the last one was done completely in darkbasic... O_O this one is a mix...
None at the moment o_O...
launching programs
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
If Particles.exe is in the same folder like your PureBasic program,
you should use "Particles.exe" only.
If you tried with the whole Path 'c:\...' then try to include
'"' before and after. chr(34)+"c:\...."+chr(34)
On old Win9x systems spaces in the path can make some problems.
If all this doesnt work, set the correct WorkingDirectory$ for
RunProgram() - maybe its always required.
cya,
...Danilo
(registered PureBasic user)
If Particles.exe is in the same folder like your PureBasic program,
you should use "Particles.exe" only.
If you tried with the whole Path 'c:\...' then try to include
'"' before and after. chr(34)+"c:\...."+chr(34)
On old Win9x systems spaces in the path can make some problems.
If all this doesnt work, set the correct WorkingDirectory$ for
RunProgram() - maybe its always required.
cya,
...Danilo
(registered PureBasic user)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
Try this:
Bye,
El_Choni
Try this:
Code: Select all
#STANDARD_RIGHTS_REQUIRED = $000F0000
#SYNCHRONIZE = $00100000
#PROCESS_ALL_ACCESS = #STANDARD_RIGHTS_REQUIRED+#SYNCHRONIZE+$0FFF
ProgramName.s = "Particles.exe" ; Executable file name
WindowTitle.s = "Particles" ; Put the proper window title here
RunProgram(FileName)
MessageRequester(FileName+" running?", "Kill it!", 0)
ProcessId.l
ExitCode.l
hWindow = FindWindow_(0, WindowTitle)
GetWindowThreadProcessId_(hWindow, @ProcessId)
hProcess = OpenProcess_(#PROCESS_ALL_ACCESS, #TRUE, ProcessId)
GetExitCodeProcess_(hProcess, @ExitCode)
TerminateProcess_(hProcess, ExitCode)
MessageRequester("Done?", "Press when "+FileName+" has been killed.", 0)
El_Choni
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm