extract cab file and execute the exe file(inside the cab file) automatically

你说的曾经没有我的故事 提交于 2019-12-02 18:41:51

问题


I have a cab file(w/ an executable file inside) embedded on my webpage. When the user access the page the cab file will be automatically extracted and the executable file inside should be executed as well. Is this possible? My hunch is that this will be configured in my inf file but I don't know how. I would appreciate your help in this.


回答1:


You need to use the hook&run values, like in this sample

[version]  
signature="$CHICAGO$"  
AdvancedINF=2.0  

[Add.Code]  
time.ocx=time.ocx  
msvcrt.dll=msvcrt.dll    
mfc42.dll=mfc42.dll  
olepro32.dll=olepro32.dll  

[time.ocx]  
file-win32-x86=thiscab  
clsid={DCF0768D-BA7A-101A-B57A-0000C0C3ED5F}  
FileVersion=1,0,0,0  
RegisterServer=yes  

[msvcrt.dll]  
FileVersion=4,20,0,6164  
hook=mfc42installer  

[mfc42.dll]  
FileVersion=4,2,0,6256  
hook=mfc42installer 

[olepro32.dll]  
FileVersion=4,2,0,6068  
hook=mfc42installer

[mfc42installer]  
file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab  
run=%EXTRACT_DIR%\mfc42.exe  


来源:https://stackoverflow.com/questions/1062550/extract-cab-file-and-execute-the-exe-fileinside-the-cab-file-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!