Archive: Trying to create an Updater program.


Trying to create an Updater program.
I have searched the forum but have not found what I am looking for.

I have used NSIS to create an installer. It works fine, creating files and links.

The installer does not create any registry keys. The program the installer installs, however does create a registry key for values.

HKCU/Software/program name
There is 1 REG_SZ and 4 REG_Binary keys in the directory.

I want to create an installer that will only work if the following exists:

1. the program "exe" file exists
2. the program "dll" file exists
3. the programs regkey exists

I have got 1 & 2 figured out. How do I do #3.

Should I be doing anything else? Should i be creating additional reg keys?

My uninstaller will delete everything and is linked from the start menu.

Thanks for your assistance,

Brett

P.s. I am not a heavy programmer, so simplicity is devine!


It sounds like you need something like this:

ReadRegStr $R3 HKCU \
"SOFTWARE\Company Name\Software Title" \
"LastInstallPath"
StrCmp $R3 "" 0 installed
MessageBox MB_OK "Must not be installed."
Goto end
installed:
MessageBox MB_OK "Software Found."
end:


You can also check for errors after attempting to read from the registry key. This ensures that it will fail even if the value is "".

ClearErrors
ReadRegStr ...
IfErrors ...

-Stu


Hi! I'm new on this forum, I have a trouble with realization of updater. The process of updating must be executed on http, ftp protocols or on local network(from share folders). I have a next idea:
1.when update program started, user can choose the way of update. There are 5 ways: first - by http with preset paths;
second - by http, but user will assign the way manually;third and fourth ways are the same but protocol is ftp; fifth way is - user assign the path to local resourse(shared folder).
2.Thereby we choose the server where are located files which must be copied on user machine to update the software.
3.I think on server must be locate a text or ini file in which described the files to update(name, date of modification, size, version). Also the same file must be locate on the user machine, but there must be described files, which are installed on user's machine.
Then updater must compare the filelist from on the server with filelist from users machine(by date, size or version) and in the next window display in the listbox the files which user must update.
May be anybody have expirience in this i'll be glad to know anything about this. I dont, know how to compare the ini or text files. There are exists function "TextCompare" in NSIS, but it doesn't work, I don't know why.
May be my idea is bad and incorrect,i'll be pleased to hear any new information.
I've used the SwUpdata by AfrowUK it's good product and I think it wil be usefull to me, but i'm beginner in NSIS and some details is not clear for me yet. I'm sorry for my language, i'm from Russia.


Comparing to mine, your english are perfect :)
Definitely INI is the way to go, see NSIS manual,

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2

also, a good forum search, I'm sure will come up with many details.