Grazie, Mitaly, riesco ad usare la createprocess ma non la createprocessw , che mi serve per accedere ai file sotto delle directory con caratteri speciali.
questo è il codice:
codice:
STARTUPINFOW si;
	PROCESS_INFORMATION pi;

    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    ZeroMemory( &pi, sizeof(pi) );

    

    // Start the child process. 
    if( !CreateProcessW( NULL,   // No module name (use command line)
		L"c:\\prova.bat",        // Command line
        NULL,           // Process handle not inheritable
        NULL,           // Thread handle not inheritable
        FALSE,          // Set handle inheritance to FALSE
        0,              // No creation flags
        NULL,           // Use parent's environment block
        NULL,           // Use parent's starting directory 
        &si,            // Pointer to STARTUPINFO structure
        &pi )           // Pointer to PROCESS_INFORMATION structure
    ) 
    {
        printf( "CreateProcess failed (%d).\n", GetLastError() );
        return 0;
    }

    // Wait until child process exits.
    WaitForSingleObject( pi.hProcess, INFINITE );

    // Close process and thread handles. 
    CloseHandle( pi.hProcess );
    CloseHandle( pi.hThread );
e questo l'errore , va in crash , non restituisce un errore alla printf.
Unhandled exception at 0x7c82f284 (kernel32.dll) in testchar.exe: 0xC0000005: Access violation writing location 0x00425070.

non riesco a capire quel kernerl32.
ciao.