Click here to Skip to main content
15,889,651 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: safearray of variant Pin
TheGreatAndPowerfulOz29-Sep-11 6:47
TheGreatAndPowerfulOz29-Sep-11 6:47 
GeneralRe: safearray of variant Pin
jkirkerx29-Sep-11 8:18
professionaljkirkerx29-Sep-11 8:18 
QuestionCOM dll that uses Windows7 libraries on XP Pin
Al_Pennyworth28-Sep-11 9:05
Al_Pennyworth28-Sep-11 9:05 
AnswerRe: COM dll that uses Windows7 libraries on XP Pin
TheGreatAndPowerfulOz28-Sep-11 9:10
TheGreatAndPowerfulOz28-Sep-11 9:10 
GeneralRe: COM dll that uses Windows7 libraries on XP Pin
Al_Pennyworth28-Sep-11 9:23
Al_Pennyworth28-Sep-11 9:23 
GeneralRe: COM dll that uses Windows7 libraries on XP Pin
TheGreatAndPowerfulOz28-Sep-11 9:27
TheGreatAndPowerfulOz28-Sep-11 9:27 
AnswerRe: COM dll that uses Windows7 libraries on XP Pin
Randor 28-Sep-11 19:50
professional Randor 28-Sep-11 19:50 
QuestionTodays Question, ShellExecute using - start /w pkgmgr.exe /iu: Pin
jkirkerx28-Sep-11 7:20
professionaljkirkerx28-Sep-11 7:20 
I'm using ShellExecuteEX just to get started with my project, and I'm sure there will be offers of a better way to complete the task. My post yesterday was to build the parameter string for ShellExecuteEX, in which I run the Pkgmgr.exe program

There are 2 ways to run the program
1. pkgmgr.exe /iu:myparameters - starts program, but quickly releases shell once program starts.

2. Start /w pkgmgr.exe /iu:myparamters - starts program, does not release shell until it's complete.

I want the second method, so my program waits until the shell completes, but ShellExecuteEx actually checks for the existence of the program file as a pre-flight check.

I was also wondering if there is a way to attach a window of something to so progress.

//Build the Shell Parameters
	lp_Operation = "open";
	lp_File = "pkgmgr.exe";
	lp_Directory = msi_DIR_AppVolumeFolder_II;

	//Build the PkgMgr.Exe Parameters for a clean installation of IIS
	lp_Parameters = caWin._create_IIS_Pkgmgr_Install_Parameters();	

	//Execute the Program in the shell
	SHELLEXECUTEINFO lpExecInfo;
	lpExecInfo.cbSize  = sizeof(SHELLEXECUTEINFO);
	lpExecInfo.lpFile = lp_File; 
	lpExecInfo.fMask = SEE_MASK_DOENVSUBST|SEE_MASK_NOCLOSEPROCESS ;     
	lpExecInfo.hwnd = NULL;  
	lpExecInfo.lpVerb = lp_Operation; 
	lpExecInfo.lpParameters = lp_Parameters; 
	lpExecInfo.lpDirectory = lp_Directory;   
	lpExecInfo.nShow = SW_SHOW ;  
	lpExecInfo.hInstApp = (HINSTANCE) SE_ERR_DDEFAIL ;   
	exit_Code = ShellExecuteEx(&lpExecInfo);
         
	//wait until a file is finished printing
	if(lpExecInfo.hProcess !=NULL) {
		::WaitForSingleObject(lpExecInfo.hProcess, INFINITE);
		::CloseHandle(lpExecInfo.hProcess);
	}

AnswerRe: Todays Question, ShellExecute using - start /w pkgmgr.exe /iu: Pin
TheGreatAndPowerfulOz28-Sep-11 7:32
TheGreatAndPowerfulOz28-Sep-11 7:32 
GeneralRe: Todays Question, ShellExecute using - start /w pkgmgr.exe /iu: Pin
jkirkerx28-Sep-11 8:03
professionaljkirkerx28-Sep-11 8:03 
GeneralRe: Todays Question, ShellExecute using - start /w pkgmgr.exe /iu: Pin
jkirkerx28-Sep-11 9:49
professionaljkirkerx28-Sep-11 9:49 
GeneralRe: Todays Question, ShellExecute using - start /w pkgmgr.exe /iu: Pin
TheGreatAndPowerfulOz28-Sep-11 11:02
TheGreatAndPowerfulOz28-Sep-11 11:02 
Questioncall to 'another program from C code Pin
salv0328-Sep-11 4:46
salv0328-Sep-11 4:46 
AnswerRe: call to 'another program from C code Pin
Madhu Nair28-Sep-11 5:36
Madhu Nair28-Sep-11 5:36 
GeneralRe: call to 'another program from C code Pin
salv0328-Sep-11 5:52
salv0328-Sep-11 5:52 
GeneralRe: call to 'another program from C code Pin
David Crow28-Sep-11 7:06
David Crow28-Sep-11 7:06 
GeneralRe: call to 'another program from C code Pin
Albert Holguin29-Sep-11 3:45
professionalAlbert Holguin29-Sep-11 3:45 
Questionindex of HTREEITEM item? Pin
zon_cpp28-Sep-11 0:56
zon_cpp28-Sep-11 0:56 
QuestionRe: index of HTREEITEM item? Pin
Code-o-mat28-Sep-11 1:42
Code-o-mat28-Sep-11 1:42 
AnswerRe: index of HTREEITEM item? Pin
Madhu Nair28-Sep-11 1:47
Madhu Nair28-Sep-11 1:47 
GeneralRe: index of HTREEITEM item? Pin
zon_cpp28-Sep-11 2:06
zon_cpp28-Sep-11 2:06 
GeneralRe: index of HTREEITEM item? Pin
Stefan_Lang28-Sep-11 4:52
Stefan_Lang28-Sep-11 4:52 
AnswerRe: index of HTREEITEM item? Pin
Maximilien28-Sep-11 2:52
Maximilien28-Sep-11 2:52 
GeneralRe: index of HTREEITEM item? Pin
Stefan_Lang28-Sep-11 4:54
Stefan_Lang28-Sep-11 4:54 
QuestionRe: index of HTREEITEM item? Pin
Code-o-mat28-Sep-11 9:57
Code-o-mat28-Sep-11 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.