Skip to content
⌘ NSIS Forum Archive

Is it possible to change user-agent in InetLoad?

6 posts

pedroac#

Is it possible to change user-agent in InetLoad?

Hi

I've been using InetLoad to make a small HTTP download in my installer, but I've recently noticed that the HTTP requests use "NSIS INETLOAD" or something similar in the "user-agent" header.
Is it possible to change that header's value?

Thanks a lot
Takhir#
MSVS 6.0 or later required, change line 625 ( if((hSes = InternetOpen("NSIS_InetLoad (Mozilla)", openType, szProxy, NULL, 0)) != NULL)
) and rebuild dll.
pedroac#
?

I did not understand.
You're saying I have to open the InetLoad.dll and change it?
How am I able to do that?

It seems that i do not have this file:
#include "..\exdll\exdll.h" (line 59, includes section)

Could you send it, please?
Takhir#
No, open InetLoad Visual Studio project (.dsw file), then correct InetLoad.cpp file as I wrote above and re-compile dll. But I see you have not VS.. OK, what you want have as user-agent?
pedroac#
I have VS2005 and I have opened the project as you told, but in file InetLoad.cpp, in the includes sections (the lines that start with #include), you have this line:

#include "..\exdll\exdll.h"

I do not own this file, and as so I am not able to compile the project 🙁

Could you send that file so that I compile the project by my own? The user agent will be something like
"ApplicationName vXXX", and XXX will change as I make new versions of the program (that's the reason why I need to compile the project by myself)
Takhir#
Sorry, InetLoad.cpp line 624 in the last version.
exdll.h includes common NSIS defines for any plug-in, latest avalable from cvs http://nsis.cvs.sourceforge.net/nsis...12&view=markup , I attached the version I used