社区
C++ Builder
帖子详情
难:ShellExecute(0,"install",(AppsDirectory+AnsiString("\\dlls\\opendivx.inf")).c_str(),"","",SW_SHOW);
woodheadhn
2002-07-18 09:36:19
怎样在这句执行完后再继续自己的程序:
ShellExecute(0,"install",(AppsDirectory+AnsiString("\\dlls\\opendivx.inf")).c_str(),"","",SW_SHOW);
...全文
49
6
打赏
收藏
难:ShellExecute(0,"install",(AppsDirectory+AnsiString("\\dlls\\opendivx.inf")).c_str(),"","",SW_SHOW);
怎样在这句执行完后再继续自己的程序: ShellExecute(0,"install",(AppsDirectory+AnsiString("\\dlls\\opendivx.inf")).c_str(),"","",SW_SHOW);
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
kk_liwei
2002-07-18
打赏
举报
回复
http://www.csdn.net/expert/topic/864/864058.xml?temp=.280697
ljlln
2002-07-18
打赏
举报
回复
回复人: jishiping(JSP 季世平) ( ) 信誉:100
佩服!学习
jishiping
2002-07-18
打赏
举报
回复
如果AppsDirectory有空格的话,这样写:
str = AnsiString("rundll32.exe setupapi,"
"InstallHinfSection DefaultInstall 132 \"")
+ AppsDirectory + "\\dlls\\opendivx.inf\"";
jishiping
2002-07-18
打赏
举报
回复
如果AppsDirectory有空格的话,这样写:
str = AnsiString("rundll32.exe setupapi,"
"InstallHinfSection DefaultInstall 132 \"")
+ AppsDirectory + "\\dlls\\opendivx.inf\"";
jishiping
2002-07-18
打赏
举报
回复
AnsiString str;
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(STARTUPINFO);
str = AnsiString("rundll32.exe setupapi,"
"InstallHinfSection DefaultInstall 132 ")
+ AppsDirectory + "\\dlls\\opendivx.inf";
if (CreateProcess(str.c_str(),NULL,NULL,NULL,
FALSE,0,NULL,NULL,&si,&pi))
WaitForSingleObject(pi.hProcess, INFINITE);
woodheadhn
2002-07-18
打赏
举报
回复
成功了
万分感激季大师
我试过一万次WaitForSingleObject(..),就是不成
这一试就通。
以下是正确的:
current_directory(curdir);
AppsDirectory=AnsiString(curdir);
AnsiString str;
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(STARTUPINFO);
str = AnsiString("D:\\WINNT\\System32\\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 x:\\kj\\dlls\\OpenDivX.inf");
CreateProcess(NULL,str.c_str(),NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
WaitForSingleObject(pi.hProcess, INFINITE);
//WinExec(str.c_str(),SW_SHOW);
ShowMessage("ok");
VC 使用IE、火狐或默认浏览器打开网页
Shell
Execute
使用IE打开:
Shell
Execute
(NULL, _T("
open
"), _T("IExplore.exe"), _T("http://..."), NULL,
SW
_SHOW); 使用火狐打开:
Shell
Execute
(NULL, _T("
open
"), _T("firefox.exe"), _T("http://..."), NULL,
SW
_SHOW); 使用默认浏览器打开:
Shell
Execute
(NULL, _T("
open
"), _T("http://..."), NULL, NUL
MFC接收
Shell
Execute
多个参数
在应用程序开发过程中,我们经常需要带参数启动另一个执行程序,如何传递多个参数,如何解析多个参数呢? 传参数 传递参数可使用
Shell
Execute
函数,示例如下:
Shell
Execute
(NULL, _T("
open
"), _T("d:\\test.exe"),_T("123 456") , _T("d:\\test.exe"),
SW
_SHOW); 解析参...
Win10 NotePad++ “
Shell
Execute
failed (2): Is this command correct?”
问题: 右键点击->Edid With Notepadd ++ 然后出现 "
Shell
Execute
failed(2): Is this command correct?" 解决办法: 1. 打开注册表(win+R, 输入"regedit"), 2. 到 HKEY_CLASSES_ROOT 下 3. 用关键字"notepad++.exe"搜索(Ctrl+
autorun.
inf
文件命令解释
1.autorun.
inf
例子 利用autorun.
inf
自动运行exe文件和修改图标格式有以下两种: 方法1: [autorun]
OPEN
=a.exe ICON=a.ico 方法2: [autorun]
OPEN
=a.exe
shell
execute
=a.exe
shell
\Auto\command=a.exe 实际编写时,可新建txt文件,输入以上内
autorun.
inf
配置说明
autorun.
inf
是我们电脑使用中比较常见的文件之一 ,其作用是允许在双击磁盘时自动运行指定的某个文件。但是近几年出现了用autorun.
inf
文件传播木马或病毒,它通过使用者的误操作让目标程序执行,达到侵入电脑的目的,带来了很大的负面影响。 目 录 1微软发布关于autorun.
inf
的补丁 2详解与格式 2.1 DefaultIcon
C++ Builder
13,873
社区成员
102,696
社区内容
发帖
与我相关
我的任务
C++ Builder
C++ Builder相关内容讨论区
复制链接
扫一扫
分享
社区描述
C++ Builder相关内容讨论区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章