3

I was trying to execute this program using C language compiler 3.0 every thing is going alright but when i run this program it never open firefox and when i run this program`s executable file it shows compatibility issue errors :( please help me

#include<stdlib.h>
#include<stdio.h>
int main(void)
{
 system("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
 return 0;
}
4
  • which Operating system ? Commented Nov 24, 2012 at 14:08
  • @Omkant - clearly windows from the path. Commented Nov 24, 2012 at 14:11
  • msdn.microsoft.com/en-us/library/windows/desktop/… is a Win32 API entry for that Commented Nov 24, 2012 at 14:24
  • @Mike No proof: ls -l shows -rw-r--r-- 1 dafis users 17 24. Nov 16:24 C:\Program Files(x86)\Mozilla Firefox\firefox.exe. Commented Nov 24, 2012 at 15:27

2 Answers 2

2

Take a look at the execve function : http://msdn.microsoft.com/en-us/library/hyw61wtd(v=vs.80).aspx

Sign up to request clarification or add additional context in comments.

Comments

-1

Replace "\\" with "/"

#include <stdio.h>
#include <stdlib.h>

int main(){
    system("C:/Program file(x86)/Mozilla Firefox/firefox.exe");
    return 0;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.