Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is effectively a repost of my question at StackOverflow, before I settle on a programmatic solution:

Essentially, a customers users are using a website that plays up with some other technology we roll out. We've exhausted all other routes in getting things to work properly, so I'm now in workaround / bodge territory.

I've found an option on the website which does make things work. However, it's undesirable (And needless convoluted unfortunately) for us to direct the users to configure this themselves.

Therefore, what I'd like / need to do is to set a cookie on computer logon. All the cookie contains is "0:-" which just disables the feature we need to disable.

Again, I realise this is highly undesirable but assuming I can find a way out of this, then I'll be out of the woods. Ideally in VBScript, but really anything that is invisible to the users is good.

Just for context, this is a Server 2008 R2 domain with Vista and Windows 7 Clients running IE8 and IE9. That is the scope for work and all I need to get working!

I'm happy to hear alternative suggestions, but the end result is that we want to automatically disable this websites feature for our users.

Any help gratefully received.

share|improve this question

If it were possible to manipulate cookies on a remote machine without the user accessing the site, then there wouldn't be much security would there?

Even if you've got full admin rights on the client machine, it would be very difficult to find the right directory to create the file in.

The only practical solution I can think of is to route requests through a proxy which adds the cookie to outgoing requests and/or sets it in responses. It's possible to do this with Varnish or squid - no idea if MSISA can do this.

share|improve this answer
Bit of an odd response, in my opinion. You can see I've already found a programmatic solution (Which uses standard MS API's, so nothing sketchy), I just wondered if there was a more transparent way. Likewise, cookies are in %userprofile%\AppData\Roaming\Microsoft\Windows\Cookies. That said, thanks for the proxy thought. A good solution, though probably not practical here. I'll probably end up just chucking an EXE in a login script. – Dan Sep 26 '11 at 12:38
There need not to be any security measure protecting the cookies from a machine's administrator access. Meanwhile I wonder why you don't just use a a user browser session to set your cookie and just copy the cookie file to %appdata%\microsoft\windows\cookies of all users (maybe after some mangling of the contents and only if it is not present yet) – the-wabbit Sep 26 '11 at 16:08
That was my first thought Syneticon, but I encountered a few problems. Firstly, cookies don't get their own file so I'd have to overwrite any previous cookies first. Cookies also seem to have 'random' names on IE9. Finally, it just doesn't seem possible as IE tracks cookies using the index.dat file. – Dan Sep 26 '11 at 18:55
up vote 0 down vote accepted

I wanted to provide an answer to this. Sadly, there wasn't one that I could ever find so we used the programmatic solution that I came up with here:

It worked fine, though in the end we were able to get the root cause sorted.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.