Quote:Original post by ace_lovegroveQuote:Original post by petewood
I really would recommend NSIS. It'll let you explore the questions you're asking and you can see what it does and how.Quote:Well slap my thy and call it Henry there is alot an installer does.
It's 'thigh'. Took me ages to remember how to spell it. After seeing you spell it 'thy', I had a total mental block. Had to type in "connected to the knee bone" in google. [smile]
well it should be thy dammit!!
:)
ACE
I wouldnt get too daunted about this. Most of the stuff mentioned here is only for installing advanced programs (such as the updating locked files stuff).
YOUR installer need do only the things YOu want to to do.
Here is a disription of what my installer that im working on right now does (or will do), so you can see what a amiture half-assed installer does (not half the stuff mentioned above, And lots of things here you could do away with so it can be as simple as you like):
-Read contents of package (e.g what am I?, Title? How much disc space etc?)
-Display EULA if one is included in the package
-Let user choose path/paths to install to
(Note: Start menu shortcuts are files that live in a folder like normal files)
-Display a registration form (if enabled)
-Create required folders
-Unpacks files to the destination folder
-Creates shortcuts as required
-Copies itself into the windows directory (if its a newer version)*
-Adds a registry key for uninstall. The regkey points to the copy of setup in the windows dir with a command line containing uninstall info for the program.
-Dispatch a notification email to myself.
-Launch application if user asks
-Launch read me file if user asks
-Quit
Anyway heres someting to play with to get started a shortcut creator
(I didnt make this btw, so dont blame me for anything!)
#include "shlobj.h"HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc) { HRESULT hres; IShellLink* psl; CoInitialize(0); hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl); if (SUCCEEDED(hres)) { IPersistFile* ppf; psl->SetPath(lpszPathObj); psl->SetDescription(lpszDesc); hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf); if (SUCCEEDED(hres)) { WCHAR wsz[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, lpszPathLink, -1, wsz, MAX_PATH); hres = ppf->Save(wsz, TRUE); ppf->Release(); } psl->Release(); } return hres; }