Category: Work

Day job related.

Windows 7 Search Files And Programs

Rebuilt my laptop thanks to lazily allowing a rootkit to hit it and discovered that the Windows 7 Search Files and Programs function wouldn’t work.  No good, as this it is the default way I launch everything on my machine (no desktop icons FTW).  Turns out deleting one registry key does the trick:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{EF87B4CB-F2CE-4785-8658-4CA6C63E38C6}\TopViews\{00000000-0000-0000-0000-000000000000}

It’s user specific, obviously.

Bootable USB installer for Win7

You’ll need a DVD or ISO of Win7 and have your USB drive plugged in.  Take note – this is going to erase it.  Bear in mind you can create a Win7 64 bit installer with this procedure, but you cannot create this install on a Win7 54 bit machine.  Good job Microsoft.
  1. Download DiskPart.
  2. Launch DiskPart by entering diskpart at the start menu or in a command prompt.
  3. Enter list disk.
  4. Enter select disk # where # is the appropriate disk number.
  5. Enter clean.
  6. Enter create partition primary.
  7. Enter active.
  8. Enter format fs=fat32 quick.
  9. Enter assign.
  10. Copy all files from the DVD or ISO to the USB drive and it’s good to go.

Run Line / Command Line Options

Here’s a nice list of run line/command line commands for Windoze:

Accessibility Controls access.cpl
Add Hardware Wizard hdwwiz.cpl
Add/Remove Programs appwiz.cpl
Administrative Tools control admintools
Automatic Updates wuaucpl.cpl
Bluetooth Transfer Wizard fsquirt
Calculator calc
Certificate Manager certmgr.msc
Character Map charmap
Check Disk Utility chkdsk
Clipboard Viewer clipbrd
Command Prompt cmd
Component Services dcomcnfg
Computer Management compmgmt.msc
Date and Time Properties timedate.cpl
DDE Shares ddeshare
Device Manager devmgmt.msc
Direct X Control Panel (If Installed)* directx.cpl
Direct X Troubleshooter dxdiag
Disk Cleanup Utility cleanmgr
Disk Defragment dfrg.msc
Disk Management diskmgmt.msc
Disk Partition Manager diskpart
Display Properties control desktop
Display Properties desk.cpl
Display Properties (w/Appearance Tab Preselected) control color
Dr. Watson System Troubleshooting Utility drwtsn32
Driver Verifier Utility verifier
Event Viewer eventvwr.msc
File Signature Verification Tool sigverif
Findfast findfast.cpl
Folders Properties control folders
Fonts control fonts
Fonts Folder fonts
Free Cell Card Game freecell
Game Controllers joy.cpl
Group Policy Editor (XP Prof) gpedit.msc
Hearts Card Game mshearts
Iexpress Wizard iexpress
Indexing Service ciadv.msc
Internet Properties inetcpl.cpl
IP Configuration (Display Connection Configuration) ipconfig /all
IP Configuration (Display DNS Cache Contents) ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) ipconfig /flushdns
IP Configuration (Release All Connections) ipconfig /release
IP Configuration (Renew All Connections) ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) ipconfig /registerdns
IP Configuration (Display DHCP Class ID) ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) ipconfig /setclassid
Java Control Panel (If Installed) jpicpl32.cpl
Java Control Panel (If Installed) javaws
Keyboard Properties control keyboard
Local Security Settings secpol.msc
Local Users and Groups lusrmgr.msc
Logs You Out Of Windows logoff
Microsoft Chat winchat
Minesweeper Game winmine
Mouse Properties control mouse
Mouse Properties main.cpl
Network Connections control netconnections
Network Connections ncpa.cpl
Network Setup Wizard netsetup.cpl
Notepad notepad
Nview Desktop Manager (If Installed) nvtuicpl.cpl
Object Packager packager
ODBC Data Source Administrator odbccp32.cpl
On Screen Keyboard osk
Opens AC3 Filter (If Installed) ac3filter.cpl
Password Properties password.cpl
Performance Monitor perfmon.msc
Performance Monitor perfmon
Phone and Modem Options telephon.cpl
Power Configuration powercfg.cpl
Printers and Faxes control printers
Printers Folder printers
Private Character Editor eudcedit
Quicktime (If Installed) QuickTime.cpl
Regional Settings intl.cpl
Registry Editor regedit
Registry Editor regedit32
Remote Desktop mstsc
Removable Storage ntmsmgr.msc
Removable Storage Operator Requests ntmsoprq.msc
Resultant Set of Policy (XP Prof) rsop.msc
Scanners and Cameras sticpl.cpl
Scheduled Tasks control schedtasks
Security Center wscui.cpl
Services services.msc
Shared Folders fsmgmt.msc
Shuts Down Windows shutdown
Sounds and Audio mmsys.cpl
Spider Solitare Card Game spider
SQL Client Configuration cliconfg
System Configuration Editor sysedit
System Configuration Utility msconfig
System File Checker Utility (Scan Immediately) sfc /scannow
System File Checker Utility (Scan Once At Next Boot) sfc /scanonce
System File Checker Utility (Scan On Every Boot) sfc /scanboot
System File Checker Utility (Return to Default Setting) sfc /revert
System File Checker Utility (Purge File Cache) sfc /purgecache
System File Checker Utility (Set Cache Size to size x) sfc /cachesize=x
System Properties sysdm.cpl
Task Manager taskmgr
Telnet Client telnet
User Account Management nusrmgr.cpl
Utility Manager utilman
Windows Firewall firewall.cpl
Windows Magnifier magnify
Windows Management Infrastructure wmimgmt.msc
Windows System Security Tool syskey
Windows Update Launches wupdmgr
Windows XP Tour Wizard tourstart
Wordpad write

Using DSquery to glean all AD users

Full AD user list (run on the controller):

dsquery user -name * -limit 0 > output.txt

Admins (or members of any group you specify:

dsget group “CN=Domain Admins,CN=users,DC=domain,dc=com” -members > output.txt

I don’t use these often enough to remember.

Written by Comments Off on Using DSquery to glean all AD users Posted in Tech, Work Tagged with ,

Windows 7 Desktop Refresh

Interesting – my work machine, a Windows 7 64 bit box, suddenly stopped auto-refreshing the desktop.  Delete something off the desktop, and its icon remained until you right clicked and chose Refresh.  Save something to the desktop, and it wouldn’t appear until you did the same.  A co-worker had the same issue  and, after some serious Googling, found the culprit.

Teracopy.

Uninstall Teracopy, and viola!  Desktop behaves.  Too bad, as I love me some Teracopy.  I’m currently test driving the alternative SuperCopier, which is uglier than Tera but so far works well and doesn’t fark up the refresh.

Perl PPM etc. through proxy

In order for Perl to work through a proxy (for Perl Package Manager, etc) you need to define the proxy as a system environment variable:

Right click on “My Computer”, click on “Properties” and select the “Advanced” tab. Click the button marked “Environment Variables” and make the following changes in the “System Variables” window:

  1. With the “New” button, add the setting HTTP_proxy, with your proxy name as the value (you must include ”
    1
    http://

    “), followed by a colon and the proxy port, if applicable; e.g., ”

    1
    http://proxy:8080

  2. If you require a user name and/or password to access your proxy, use the “New” button to add the settings HTTP_proxy_user and HTTP_proxy_pass, with your user name and password as the respective values.

From the ActivePerl FAQ.

Perl 64bit on Windows 7 – ARGV problem

Friday I rebuilt my work machine to Windows 7 64bit in preparation for the 8 gig of RAM headed my way (thanks boss!).  I also installed the most recent release of Activestate Perl 64bit.  Upon getting back down to business I discovered that none of my scripts were successfully receiving command line arguments.  If I prefaced the running of the script with perl.exe (eg: c:\perl54\bin\perl.exe e:\scripts\myscript.pl argument1 argument2) it worked fine.  Turns out this is a simple registry fix.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\pl_auto_file\shell\open\command]
@=”\”C:\\Perl64\\bin\\perl.exe\” \”%1\” %*”

Is all you need.  Dump that into a text doc and change it to a .reg file.  Double click it and let it insert into your registry and you’re good to go.  For some reason the Perl installer sets the variable acceptance (that’s this bit you see above: “%1” %*) correctly for the file extension .pl, but misses it on the required pl_auto_file.

Silly.

Written by Comments Off on Perl 64bit on Windows 7 – ARGV problem Posted in Tech, Work Tagged with