Advertisement

_spawn function..

Started by August 06, 2000 09:51 PM
1 comment, last by SikCiv 24 years, 4 months ago
I wanna open a folder in explorer from my app, i guess i need to use the spawn function, but all it does is open explorer in c:\, without the folder i want to open. This is my command: _spawnlp(_P_NOWAIT,"explorer.exe,"c:\\windows",NULL); ive also tried: _spawnlp(_P_NOWAIT,"explorer.exe,"c:\windows",NULL); _spawnlp(_P_NOWAIT,"explorer.exe,"c:/windows",NULL); _spawnlp(_P_NOWAIT,"explorer.exe,"c://windows",NULL); with no luck... (running Win95, using MFC and vc5)

  Downloads:  ZeroOne Realm

You need to call _spawnlp like this:
_spawnlp(_P_NOWAIT, "explorer.exe", "explorer.exe", "c:\\windows", NULL);

Edited by - Maverick on August 6, 2000 11:14:54 PM
Advertisement
Thankx, it works. Dunno y u put 2 copies of the exe in.. but hey, anythings possible where MS is lurking.

  Downloads:  ZeroOne Realm

This topic is closed to new replies.

Advertisement