[C]특정디렉토리에서 특정파일실행시키는 방법[답변추가해주세요]
딸기맛사탕
질문 제목 : 특정디렉토리에서 특정파일실행시키는 방법제곧요(제목이 곧 요약)질문 내용 :
system(start c:\\windows\\system32\\telnet.exe);이런코드로도 실행이 안되네여
(\\은 \으로처리됨.)
path 환경변수에 등록된것들만
system(start python);
system(start iexplore naver.com);
이런식으로 실행이 가능합니다.
특정디렉토리의 파일을 실행할 수 있는 방법은 없을까요?
+ system(start c:\x2fwindows\x2fsystem32\x2ftelnet.exe);로도 안됩니다.
+ 혹시 어떤분이 저디렉토리에 저파일이 실존하는지 물을까 두려워서 사진첨부
소스 예시#includestdio.h
#includewindows.h
main(){
system(start c:\x2fwindows\x2fsystem32\x2ftelnet.exe);
system(start c:\\windows\\system32\\telnet.exe);
system(c:\x2fwindows\x2fsystem32\x2ftelnet.exe);
system(c:\windows\system32\telnet.exe);
system(c:\\windows\\system32\\telnet.exe);
}
사진을 보면 아시다시피 \\입력해줘야 \로인식됩니다.
답변자한분 말씀대로 복사방지 해제했습니다.
올바른 상황설명을 위해 그림파일 하나더 첨부합니다.