Page 1 of 1
Runprogram
Posted: Wed May 24, 2006 8:54 pm
by Inf0Byt3
I'm trying to make this work on linux but i'm stumbled it ain't working... I want to run UPX 2.0 for lin with this proggie but it returns 6222 -> i bet this is an error in upx. I am correctly calling the app. Why doesn't it work?
Code: Select all
power.s = "9"
upx.s = "/root/upx"
file.s = "/root/testexe"
Debug RunProgram(upx,"-"+power.s+" "+Chr(34)+file+Chr(34),"",#PB_RunProgram_Wait)
Posted: Wed May 24, 2006 9:03 pm
by walker
Hi,
I think, you're not root, trying to run a programm in /root/...
I know, you're runnung ubuntu.... are you sure, you have the appropriate rights for this folder

May you'd installed it as root but now trying to run it as normal user...
Posted: Wed May 24, 2006 9:07 pm
by Inf0Byt3
Yes, I am root, but I don't have ubuntu installed. I use Mandriva2006. I think there's something wrong with the RunProgram() procedure :roll: . The files are there, but it still doesn't run correctly

.
Posted: Wed May 24, 2006 9:37 pm
by walker
Hmm.. you're right.. I don't have upx installed an get a debug message of 12389 (which should be only >0 if the command succeeds... :roll: )
It's must be a bug in RunProgram().. type what ever you want as programm to start (i.e: jkdjshfgjksdgfj) Runprogram()
never fails

...
Giving a path to a prog that exsists on my PC, all went well...
Posted: Wed May 24, 2006 10:05 pm
by Inf0Byt3
Doesn't exist for linux a command like ShellExecute() for windows? There should be one there too :roll: . Hope whis will be fixed in the next version of PB...
Posted: Wed May 24, 2006 10:23 pm
by WishMaster
You can use System_() instead of RunProgram()
...and do NOT work as root! This is not healthy!
Posted: Thu May 25, 2006 11:53 am
by Inf0Byt3
Thanks WishMaster! BTW, I ran only this as root to test it, I usually use my normal account.