Archive for the 'Offense' Category
One last update to ArrangeByImage for today
I had a couple of suggestions passed to me today, one to allow drawing in the picture box area and arrange by the drawing, and two to build a few of the pictures into the executable and allow them to be used via a switch.
So for you folks out there who asked, you shall received, I just uploaded ArrangeByImage 1.2 (download from ArrageByImage Page above) which satisfies both requests.
Three new switches have been added “-heart”, “-star”, “-smiley” that will arrange the icons based on one of those three images that are saved in the executable so no additional picture is required.
Finally, there is now a check box that switches the program from selecting a file to allowing you to draw in the image area.
1 commentUpdate to ArrangeByImage
As I attempted to anoy those around me with ArrangeByImage today I realized one major flaw. The original (now updated) code did nothing about the align to grid option on the desktop. I fiddled a bit and found the style that sets that on the desktop and I am now removing “Align To Grid” when you run the program. And in the interest of saving others the effort to find out how this is done here is a code snippet in c# / Win32API. Note this will actually work for any listview which is technically what the desktop is.
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpszClass, string lpszWindow);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
const uint LVM_SETEXTENDEDLISTVIEWSTYLE = 4150;
const uint LVM_GETEXTENDEDLISTVIEWSTYLE = 4151;
const uint LVS_EX_SNAPTOGRID = 524288;
private void turnOffSnapToGrid()
{
IntPtr programmanagerWindow = FindWindow(null, "Program Manager");
IntPtr desktopWindow = FindWindowEx(programmanagerWindow, IntPtr.Zero, "SHELLDLL_DefView", null);
IntPtr listviewWindow = FindWindowEx(desktopWindow, IntPtr.Zero, "SysListView32", null);
HandleRef desktopReference = new HandleRef(null, listviewWindow);
int CurrentSettings = (int) SendMessage(desktopReference, LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
IntPtr ptr = new IntPtr(CurrentSettings & ~LVS_EX_SNAPTOGRID);
SendMessage(desktopReference, LVM_SETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, ptr);
}
No comments
Updated ArrangeByImage
Made an update to ArrangeByImage so it now supports command line switches. This is in keeping with the general purpose of this site which is to annoy your co-workers. Now you can run ArrangeByIcon on a friends computer and watch their confused face. Have Fun!
No commentsMouse Mayhem
Back to the low tech for today’s article. I don’t know if you remember this one but back in the day it was fun to take the mouse ball from your friends/schools/coworkers mouse and let them be confused for a while. This sort of fun can still continue with optical mice and it is actually easier to be sneaky about it. What do you do you might ask? Simply slap some masking tape over the sensor and the mouse is a ball-less optical mouse. An important note though, don’t use scotch tape, it doesn’t have quite the same effect.
Another fun one is just to hook an extra wireless mouse up to their computer and “help” them get their work done.
Have fun!
1 commentUpdate to owexec
Made a couple small revision to owexec at the request of readers. PSEXEC has a flag that allows you to reference a local file and have PSEXEC copy it over to the destination which is kinda handy. So I added the -copy flag to owexec. If you add -copy to the command line then it will find the file on the local computer and copy it over to the admin$ share on the destination computer. Then execute it from there. Not a terribly necessary flag but it can be helpful. The second update is the flag -nowait which just makes it not ask you to press a key at the end before exiting. Enjoy.
No comments