Helo all,
I try to do subst command to map a folder to a drive letter.
I achieved it through command line.
I did same thing via createProcess().
It returns non zero value but the folder not get mapped to that drive letter.
I am using windows2003 and NT.
The part of the code:
The DebugLogMessage1(cmd); prints the value of cmd as subst R: C:\PROGRA~1\SyntegraCode:STARTUPINFO si; PROCESS_INFORMATION pi; int flag, err, i; GetStartupInfo(&si); /* flag = 0; flag = CREATE_NEW_CONSOLE; flag = DETACHED_PROCESS; flag = CREATE_NEW_PROCESS_GROUP; */ flag = 0; DebugLogMessage1(cmd); if(!CreateProcess(NULL, cmd, NULL, NULL, FALSE, flag, NULL, NULL, &si, &pi)) { err = GetLastError(); LogMsg(3, "RunCommand: Could not create process %s error=%d", cmd, err); return; }
Please give me the things went wrong in the above program or in the windows settings.
Regards,
Naga



LinkBack URL
About LinkBacks



