Skip to content
⌘ NSIS Forum Archive

Creating a cookie

8 posts

Neeraj Tewari#

Creating a cookie

I wanted to create a cookie while installing the software.This cookie will contain the version number of the Software being installed.

Does anyone knows how to do that ?

Thanks
Neeraj
Neeraj Tewari#
The problem is that I have to set the cookie on User's machine when he installs the software.
It's not through website .I do have an html help page which i show after the User has successfully installed the software.
But its an offline User guide .

I am not sure how I can do that .
Does anyone has tried this before ?

Thanks
Neeraj
Neeraj Tewari#
Lunar,

The problem is that the cookie will be used by some of our websites.
So I don't think the ini file will serve the purpose 🙁
Neeraj Tewari#
Verburg,

What do you mean by opening a site ?
Do you want me to open some website for that purpose 🙁(
lzandman#
Originally posted by Neeraj Tewari
What do you mean by opening a site ?
Do you want me to open some website for that purpose 🙁(
Yes, I think he means that. Cookies are normally only used when visiting websites. So it would be logical to use a webbrowser session to set the cookie. Afterall, you don't know which browser the user uses, so even if you succeed in adding cookie-support to your installer it's likely to work only for some browsers. Netscape and Internet Explorer use a different way of storing cookies, so there's no general rule for creating cookies.

I don't know why you want to use the cookie, but I assume it's for registration purposes? Well, then you can let the installer visit a website after a succesful installation. Just pass the values you want stored in a cookie in the URL. Example:

http://my.server.com/registration.php?email=tom@internet.com&serial=1234456

Make sure this PHP-page sets the cookie you want.