Search found 4 matches

by rootbear
Fri Sep 30, 2011 4:11 pm
Forum: Tricks 'n' Tips
Topic: Windows Service Framework
Replies: 23
Views: 14236

Re: Windows Service Framework

it's amazing that after a couple of years, the code is still valid!

I got another 'crash' issue here, i should call myself mr. crash ;)

here you go:

copy & paste the code and tested, working!

and then I added EnableExplicit, did adjustment here and there,

myservice -i
net start myservice

wait ...
by rootbear
Wed Sep 28, 2011 10:34 pm
Forum: Coding Questions
Topic: programId crashes on Windows XP
Replies: 6
Views: 1077

Re: programId crashes on Windows XP

thanks a lot, guys!

i end up coding it in vb6 (but i hate the runtime.) before i came back to check the reply.

now i can use pb, yahoo!

again, thanks
by rootbear
Wed Sep 28, 2011 7:10 pm
Forum: Coding Questions
Topic: programId crashes on Windows XP
Replies: 6
Views: 1077

Re: programId crashes on Windows XP

sorry, some typo in the code.
here is the code i actually compiled, still crash on line

pid = ProgramID(prod)



MY_PROGRAM_NAME.s = "C:\windows\system32\calc.exe"

If OpenConsole()

prog = RunProgram(MY_PROGRAM_NAME, "","",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read)
PrintN("prog ...
by rootbear
Wed Sep 28, 2011 3:50 pm
Forum: Coding Questions
Topic: programId crashes on Windows XP
Replies: 6
Views: 1077

programId crashes on Windows XP

new to here,

here is what i want to accomplish:

create a windows service in PB
1) to start console EXE {program1} (by another language) in background without CMD window;
2) to loop and check if program1 is running or not periodically, if not, restart it;

code here:

prog = RunProgram(MY ...