I want to create a setup program that willsave files and such to certain directories... i.e. font files, etc. but i need to know a few bits of information:
how to create a new folder
how to extract a file from inside a zip file
Printable View
I want to create a setup program that willsave files and such to certain directories... i.e. font files, etc. but i need to know a few bits of information:
how to create a new folder
how to extract a file from inside a zip file
Use Inno Setup.
1. Use the mkdir() functionQuote:
Originally posted by jmelmore
I want to create a setup program that willsave files and such to certain directories... i.e. font files, etc. but i need to know a few bits of information:
1. how to create a new folder
2. how to extract a file from inside a zip file
2. Search on www.pscode.com for examples on how to do this. It's complicated.
Also, you might want to try a commercial program, rather than making your own, unless you have a very good reason to.
A setup program made in VB won't work on a machine without VB runtime files.
MkDir "mydir"
Although, as you may know VB is shipped with Setup1.vbp. Open it and if you want you can modify it. Take a good look at it.
1.
VB Code:
Private Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal lpPath As String) As Long Private Sub Form_Load() 'make sure "c:\somepath\someotherpath" exists! MakeSureDirectoryPathExists "c:\somepath\someotherpath" End Sub
2. Click here (No, it's really not that hard - I got it to work easily although some of the advanced features can be a bit more complicated)
the code related to LZW type compression, which is what ZIP uses as its basis (as I understand it), is proprietary and putting it in your code would involve either royalties or messy law suits.
If you are doing this just for fun, the routine itself isn't actually all that tough, though I have no idea what the actual directory format that ZIP uses, and I am quite sure that they aren't too keen on telling everyone.
The most common way to do this without getting into anythig messy is to get a free or freeish command line ZIP program (many exist) and call that from your VB program using a SHELL call.
Anything involving DLLs and all that will usually involve paying someone money to make it work!
Hope that helps.
(Anyone interested in knowing the code should check out the local University Computing Science web pages for courses on file formats. Or search the web for LZ77 / LZ78 compression formats. These are free...LZW and several of its variations are preotected.)
Use Visual Studio Installer 1.1
Nothing's hard when you're using someone else's project.Quote:
Originally posted by Armbruster2
No, it's really not that hard
I find innosetup to be useful to me :)
I suppose that would be true if I was using someone else's project. I did use the vbunzip10.dll, but not the project.Quote:
Originally posted by The Hobo
Nothing's hard when you're using someone else's project.
Again, it's not that hard.