Archive for the 'Windows' Category

Access administrative shares on Server 2008/Vista

Tuesday, August 19th, 2008

Quick windows tip again, if you find yourself unable to access the administrative shares (\\machine\c$, tasks, etc) on a Windows Server 2008 or Vista computer with UAC enabled, using the credentials of a local administrator — don’t panic. This is actually intended.

Turns out local administrators cannot elevate their privileges over the network, with UAC enabled.

Note that this doesn’t affect users in the Domain Admins group!

Now, you could do the dumb “neowin poweruser” thing and turn UAC off, or you could change this particular behavior in the registry. Navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

And add a new DWORD named LocalAccountTokenFilterPolicy with a value of 1, and then reboot. It all should work.

Again, users with Domain Admin privileges are unaffected.

Xapian Python Bindings (Win32) 1.0.3 Released

Wednesday, October 3rd, 2007

I have compiled version 1.0.3 of Xapian for Windows, and I have built and packaged the Python Bindings for your convenience.

You can find the new version here.

This time they are available for both Python 2.4 and 2.5. Enjoy.

Xapian Python Bindings (Win32)

Tuesday, August 21st, 2007

I have built the Xapian Python Bindings on Windows. They comes packaged with an easy, standard (distutils) installer. This may help with some of the headaches associated with running Xapian on Python and Windows.

Getting the whole thing to compile was not exactly a walk in the park, so I assumed people would be glad to have an easy Binary installer handy. I plan to use this library for a few internal projects, and I want the said project to be as multi platform as possible.

So far, they are only packaged for Python 2.5 but I will try to package them for 2.4 later on today or during this week.

See the details here.

They were built on Windows Server 2003 with MSVC from Visual C++ 2005 Express.

I hope this helps.

Crappy parser is craaaappy

Friday, December 1st, 2006

Just when I was starting to actually enjoy (read: thinking “hey, it’s not so bad!”) Windows scripting after discovering documentation for the 32 bits command interpreter in Windows NT, I realize I have been spoiled by Unix shells and expect some things to work, and then frown in disgust when they don’t.


for /F "usebackq tokens=2,*" %i in (`net use | find "..."`)... 
| was unexpected

I really wanted to like writing cmd scripts. But the parser is way too obnoxious when parsing brackets. For instance, you can’t set an environement variable in one branch of a conditional statement.


if "text" EQU "othertext" ( 
    set VAR=value 
) else ( 
    echo Not Working. 
)

This will fail silently or with unexpected results. Can’t wait until PowerShell becomes mainstream enough for me to use.

Windows Tip: Remote Console with remote.exe

Wednesday, November 29th, 2006

EDIT - 2008-03-03: Actually, screw this shady use of the remote debugger. Use psexec like a man instead, and enjoy the power of WMI.

This is nifty. Not something to scream about while tearing your clothes off in a moment of raw ardency, but still, I find it relatively useful.

You perhaps already know how Windows Debugging Tools such as WinDbg can output to a serial or network console, but I found out this concept can be extended to basically any console application that doesn’t really mess around with the terminal. See it as a mix between netcat and screen.

You just need “remote.exe” that comes with the Windows Debugging Tools. I personally use it to launch Macromedia JRun4 in a console on a development server at one of my client sites to debug their web application remotely. That way I can see the log in my local console instead of toggling between the server and Terminal Services. Read on for an overview of how it works. Read the rest of this entry »

Quick Windows Tip: Active Directory MMC as Admin

Friday, November 24th, 2006

That title is way longer than it should be. Anyways, I just like to administer Active Directory Users and Computers from my workstation, on which I am logged on as a plain user.

To run the Active Directory Users and Computers with Administrator rights, you can use some runas.exe magic. Just create a shortcut to the following target:

C:\WINDOWS\system32\runas.exe /USER:DOMAIN\adminuser "mmc dsa.msc"

Of course, just change DOMAIN\adminuser to whatever applies.

It works fine for my purposes. The trick is just knowing the name of that particular mmc snap-in. That’s pretty basic knowledge, but I’ve been asked three times this week about it.

PowerShell is out

Thursday, November 16th, 2006

Microsoft PowerShell was just released.

PowerShell is actually the only new technology coming from Microsoft that has gotten me excited. I have played around with the Betas and Release Candidates at work, now I can finally USE it. It will take some time before it reaches the production environnement, but this will make my life substantially more pleasant when working with windows.

Apple Hardware on microsoft.com?

Tuesday, December 6th, 2005

I was browsing microsoft.com lately, and saw this.

Humorous.

The stock photo used in there appears to be an Apple iBook.

Mild amusement on my part.

Update: Here is the link to a screenshot of the full page.

Subversion: On fixing “can’t recode string”…

Wednesday, November 16th, 2005

Well, I recently set up a subversion system where I work, on Windows. Clients are using Tortoise SVN, and everything works beautifully. However this morning, I checked out the trunk on my Mac OS X powered Powerbook, and the lawnmower hit a brick the split second svn tried to checkout a folder with accented characters (In french, for instance. Could have been german umlauts).

svn: Can’t recode string

Well, this was a matter of changing the encoding used by my system locale to match the one of the repository, which was done by editing the file .profile in my home directory (I use bash as a default shell, which is the default on OS X 10.3 and above, as opposed to csh) and added the following:


export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"

This basically had the effect of setting up the locale to UTF8, which swallowed the file without problems. I just though I’d post it there because it was useful — I didn’t really google around to check out if that solution was already out there, but I will mirror it on underwares.org anyways.

Hope this helps someone, somehow. :)

Bettering the Windows Command Prompt Part 1

Saturday, September 17th, 2005

Well, the current job I have landed at requires me to work with Windows alot. Perhaps a bit more than I’d like, but still, I get to appreciate some things in windows-land and also despise alot of small things that make my daily life hell.

But apart from that, I stick to my true Unix roots and try to do as much as possible with the command prompt — not out of pride, or some other political reasons, but rather because I like command prompts. They indeed make me all mushy inside and moist down the pants for a very sadistic and wrong reason. I just find that I am more efficient with them.

So, I stumbled across a few things that made my daily journey into text input land alot more pleasant, and I will share them with you. Read the rest of this entry »