Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

I am developing an ActiveX installer so I need to create .inf file.
Can anybody please let me know how to create .inf file?


Thanks
Posted
Updated 20-Jun-23 15:13pm
v2
Comments
Sergey Alexandrovich Kryukov 26-Sep-11 3:03am    
This is a simple text file, so what's the problem?
--SA
meghamaharshi 26-Sep-11 3:17am    
Thanks for your reply...
i have done with this.

Sergey Alexandrovich Kryukov 26-Sep-11 3:21am    
Nice talking to you...
Good luck,
--SA

C#
System.IO.File.WriteAllText(@"d:\WriteText.inf", text);


text = data to add in inf file
 
Share this answer
 
take a text file and save as "filename.inf".
double quotes is menedatory.
 
Share this answer
 
Comments
Dalek Dave 26-Sep-11 4:03am    
Easiest Answer Ever?
A sample INF to install ActiveX. Copy and paste in Notepad and save as ActiveX.inf
You can find all the details for packaging and distributing ActiveX controls
here
[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
 
Share this answer
 
Hi,

Make sure the encoding of ".inf" file should be ANSI.
 
Share this answer
 
in 2023....now we can create JSON data, there are many libarry to handle with JSON data
 
Share this answer
 
Comments
Dave Kreskowiak 20-Jun-23 23:05pm    
Too bad you can't use a JSON file to install an ActiveX control on a machine.

Next time, read the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900