|
-
February 18th, 2009, 08:55 AM
#1
ShellExecute is not performing as expected
Good Morning,
I am a newbie to Visual C++ programming. I have been trying to extract files from a CAB by use of the ShellExecute command. I have made a batch file (CABTest.bat) that does the following:
expand Test.cab -f:*.* C:\Temp\CABStuff
I have converted the CABTest.bat into an exe file called CABTest.exe
I am then using the ShellExecute(...) as follows and nothing happens:
void CInstallerDlg::OnBnClickedShell()
{
// TODO: Add your control notification handler code here
HINSTANCE hInst = ShellExecute(0, L"open", L"c:\\Temp\\CABTest.exe", NULL, 0, SW_SHOW);
}
If I double-click the CABTest.exe file from my browser, the file are extracted. The path is correct because I've tried this out with notepad.exe from the same directory.
Does anyone have any suggestions as to what I done wrong?
Thanks,
Lee...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|