Contents tagged with Windows Specific
-
What happened on August 27, 2001?
Internet Explorer 6 was officially released.
-
XP SP2 using Alternate Data Streams for Security Warnings
A while ago I blogged about Alternate Data Streams and how they are hidden from the users.
At that time, you could presume when an ADS was present, it was something special, because not many normal files have an ADS attached to it.
But yesterday I got an interesting question about XP SP2 showing a Security Warning when you want to execute something downloaded from the internet.
We guessed Alternate Data Streams were used, so I checked this out and it turns out XP SP2 indeed adds an ADS when you download a file from the Internet.
This stream is called Zone.Identifier and contains the following information:
D:\Tmp>more < TestZip.zip:Zone.Identifier
[ZoneTransfer]
ZoneId=3
Since SP2 did this, it probably means it's a modification to Internet Explorer.
So, I got the Firefox 1.0.3 and downloaded a file with the default settings, and as I guessed, no ADS with Zone.Identifier.
(I believe Firefox doesn't have such thing as Zones, but it would be nice if Firefox added this ADS to let the new Security Warning, informing you it's a downloaded file, come up). -
BlogCast - Alternate Data Streams
Some time ago I saw something about Alternate Data Streams, but I can't find the source anymore to give credit :(
Alternate Data Streams are a "feature" of NTFS, making it possible for one file to store data in multiple streams, attached to the file.
I have made a small BlogCast about Alternate Data Streams, demonstrating them using a cmd, and a C# program.
It's 8 minutes in length, 6.2 MB in size and I also included the used source code.
This is my first attempt at a BlogCast, and in English, if you have any comment on how to improve it, please tell me :)
-
The Invisible Administrator
Today something very weird happened and I doubt something this weird will ever happen again.
I was working on a site at school when I browsed to a file-server to check some paths, and to my surprise I could suddenly access ALL shares, not only the ones for students, but all of them...
When I tried creating files they got made under BUILTIN\Administrators! But I was logged on with my own student account. So, being nice and all, I reported it...
Then we spent almost entire afternoon trying to determine why I was suddenly an admin.
And this is when the weird stuff started to happen:
On PC1 I was an admin on the server, but when I logged in to PC2 I couldn't access it.
We tried different student accounts on PC1 but they also couldn't access the shares.
Then we removed all groups from my account except Domain Users, and I still could get in.
We cleared the profiles from PC1 and 2 and also deleted my roaming profile.
Nothing changed...
First conclusion: It's tied to username X and PC1, examine PC1 later.
Then we go to another room and try it on different computers. And there it starts all over again.
PC3: I'm an admin, PC4: I'm not.
In the end we checked all groups I belonged to, and their membership, deleted my profile, checked all NTFS permissions (which I could change as well..), and nowhere there was a trace of me or any groups I belonged to. Nothing had admin rights.
We forced replication to make sure I was group-less but it still worked!
Conclusion: User X has the rights of an Admin, but does NOT show up in any group, NTFS permissions or anything else...
Solution: We disabled the account and created a new account.. (Which means I have to recreate my entire profile again...)
Has anyone else every encountered this, and found out why this was happening? -
Random Wallpaper through Scheduled Tasks
With my new laptop I got a screen with a 1920x1200 resolution, so I went out looking for wallpapers for the resolution, because my existing ones degraded in quality with that size.
My search led to Deaddreamer from which I have my current wallpaper as well.
But nowadays he got so many good ones, so I picked up 5 1600x1200 wallpapers. And now I want a random wallpaper each time I logon.
Having some spare time (very rare) I created something small myself, I'm sure there are tools out there to do all that.
Originally I wanted to use PHP to get a random number and set the wallpaper, and then call the php script with a bat file and set it as a scheduled task. But that kept popping up a dos prompt each time it set it, and my wallpaper disappeared after boot (some bad registry settings).
So I used KiXtart to set the wallpaper and then link it with a shortcut which would run minimized.
That worked for one paper, but when I tried the RAND function in KiXtart, it didn't go well.. But I had the php script and bat still there so I let that make a random number and then kill the KiX script with that number as argument.
Result:
Shortcut to wall.bat, which calls wall.php, which makes a random number and calls wallpaper.kix with the number, after which my wallpaper is set, and saved in registry.
I have to shortcut Run as minimized and on logon and every hour, and now I got a nice random wallpaper implementation.
Overly complicated? Maybe, If you have php installed, it's a small solution, otherwise you need a 1.3Mb dll and 24k php.exe in the same dir, which isn't really something bad.
I have zipped everything and written the steps to install it out in a Readme.txt for everyone wanting it as well. I also included the php.exe and dll.
Download it here: RandomWall.zip (706Kb).
And now I have sweeeet super-detailed wallpapers auto-changing without any special timer programs running, but just the Scheduled Tasks :)
Here are my wallpapers:
ddr_0075_vertical_theory_pure.jpg
ddr_0075_vertical_theory_decay.jpg
ddr_0088_v1r2a_1600x1200.jpg
ddr_0091_bioforge_1600x1200.jpg
ddr_0086_21st_century_kaos_1600x1200.jpg
(convert them to .bmp first, not sure if it's required, but whatever, bmp is nicer, no need for desktop to go in Web mode) -
Hacking Uxtheme.dll - Watercolor Theme
One thing I immediately do on a new pc is get it personalized. This includes changing icons and wallpapers, but also resource hacking the run box and hacking the uxtheme.dll to support custom themes.
Today I'll talk about implementing the Watercolor theme I have been using for a year now, and got a lot of mails on where and how to get it.
First you have to modify UXTheme. This used to be somthing "difficult" but now it's easy. Get the UXTheme Multi-Patcher and run it.
As always, and on the left side of the blog, I'm not responsible if something goes wrong, everything you do is your responsability.
Normally, according to the page I just linked, this doesn't work on XP SP2 final, but I ran it anyway and it worked. Just make sure you wait for the Windows File Protection box to come up.
Next you get the Watercolor theme, unzip it and run WatercolorLitev211.exe, it'll install the theme and you can select it from the Desktop Configuration control panel. It packs with several colors, I either have it set to Blue or Ergonomic.
Enjoy your sweet new theme :p
A screenshot from a previous posting demonstrating the theme:
-
Windows XP Pro and IIS5 - Multiple Sites
I recently got a new laptop (Dell Inspiron 8600) and installed Windows XP Pro on it (with SP2 installed already, yes :p).
One thing I hate about this, is that it includes IIS5 and you can't install IIS6 on it (not that I know of).
Why is this bad? Because you can only have one site... Which is something I got way to much used to running Windows 2003.
Luckily enough, Davy Belmans thought the same, so he developed IIS Admin.
It's a very nice tool, very small, and sits in the tray bar, allowing you to easily add new sites, and switch between them.
Yes, switch, because even with multiple sites configured, you can only run 1 at the same time apparently.
If you run Windows XP, and you don't have a way to get multiple sites working, get this tool, otherwise, comment and tell me how ;) -
Tweaking the Run Box (Windows Resource Hacking)
Time for a new article, but not about C# this time.
This time it's about Resource Hacking, more particulary, we'll customize the Windows Run box so it will look something like this:
If you're interested, take a look at the article: Custom Run Box (Resource Hacking). -
Unable to launch notepad from 'Run' or view HTML source
Today I experienced something weird.
Normally I run a lot of files just from 'Run' (Win+R), but today I did 'Run', 'notepad', and nothing happened...
This was weird.. As I could still open .txt files with Notepad.
I could not run notepad from 'Run'! I was amazed, I mean,.. what could break notepad? :)
First I checked if the file was still there (ofcourse, how could I still view files otherwise..), and if my PATH variable still included Windows. Everything seemed ok.
But then I found it, it only seemed as I could not run notepad.
What happened was the following: There was a notepad.com file in the system32 dir all of the sudden (spyware, virus, don't know). And Windows decided to run that one instead of notepad.exe
So it seems Windows prefers .com over .exe when trying to run a file without an extension.
Why does this happen?
There's another environment variable, called PATHEXT, with the following data:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
Now you can clearly see the order of the files. I tried the same thing with a .bat and .exe file, and changing the env var, and it worked.
I'm not sure if the .COM has to be the first in line for normal system operations?
One side-effect of this was that when I wanted to View Source of a HTML page, it would also launch the notepad.com which did nothing, and thus not showing any source! I remember a lot of people complaining about not being able to view the source of their pages, this could be what's causing it!
Hopefully I'm telling something 'new' here, that's usefull ;) I never knew that order of extensions. -
Explorer Bug, Long Path, damaged directories.
This post moved to http://blog.cumps.be/explorer-bug-long-path-damaged-directories/ with additional screenshots and reproducing it in Vista.