The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Windows 7’ Category

How to install Windows 7 on a virtual hard disk (VHD) in 10 steps (via: Guides & Tutorials)

Posted by jpluimers on 2012/03/12

Handy when working with Microsoft Surface: install your development environment on a separate VHD that you can boot as your physical machine (Microsoft Surface SDK does not like being run in a Virtual Machine):

If you accept the constraints described above, I propose the following procedure, which I think is the easiest way to install Windows 7 on a virtual disk in multi-boot

Note: Within the VHD you can still access all the files on your physical HD.

–jeroen

via: How to install Windows 7 on a virtual hard disk (VHD) in 10 steps – Guides & Tutorials.

Posted in .NET, C#, Development, Microsoft Surface, Microsoft Surface on Windows 7, Power User, Software Development, Windows, Windows 7, WPF, XNA | 1 Comment »

version v3.3.4.14431 of Beyond Compare released by Scooter Software

Posted by jpluimers on 2012/03/02

About a week ago, version v3.3.4.14431 of Beyond Compare was release by Scooter Software.

For me, this is the ultimate comparison tool as it runs on Windows and Linux natively or under WINE on Mac OS.

It has a massive change list:

-----------------------------------
v3.3.4.14431      February 24, 2012
-----------------------------------

- Notable Changes
  - Fixed context menus on newer versions of Konqueror, Thunar, and Nautilus.
  - FILE-REPORT (and TEXT-REPORT, etc.) commands will now accept a saved file
    compare session name instead of a pair of files.  E.g., "file-report
    layout:side-by-side output-to:printer MySession".

- Archives
  - Fixed extracting files where a single deflate block contains more than 1MB
    of data.
  - Fixed zips showing non-existent files if a zip contained another zip and
    the outer one had additional data after the archive comment.
  - Attempting to extract a file from a zip using an unsupported compression
    algorithm now shows that as an error.
  - Split up zip error messages for "Error during extraction" and "Unsupported
    compression algorithm".

- Data Compare
  - Fixed "Extract HTML table(s)" handling of UTF-16 files.

- File Formats
  - OpenOffice default character encoding is now UTF-8.
  - Fixed "COBOL Source" format to include "Identifier" definition.
  - "Picture Files" format added CUT, GED, MSK, PFR, and TUB to mask, removed
    PAL.

- File Views
  - Fixed saving files with paths between 247-259 characters long.
  - Fixed foreground selection coloring when using white on blue system colors.
  - Added key accelerators to "Save changes" dialog.

- Folder Compare
  - Long file operations will now keep Windows from going to sleep due to
    inactivity.
  - Using "Compare to" to open a file view and then using "Next/Previous
    Difference Files" now closes the file view.

- FTP
  - Fixed support for FTP listings with filenames containing Chinese
    month/year characters.
  - Fixed parsing Comau C5G FTP listings.

- Home View
  - When editing a session, dropped files/folders are ignored unless they're
    on a path edit.
  - Expand All and Collapse All commands now affect the shared and auto-saved
    sessions nodes.
  - Fixed behavior when using "Collapse All" hides the currently selected
    session.

- Linux
  - Fixed context menus on newer versions of Konqueror, Thunar, and Nautilus.
  - Fixed Folder Compare crash when performing rules-based comparisons.
  - Fixed clicking the "Next Difference Files" link on the message panel when
    using "Next Difference" at the end of a comparison.
  - Fixed various comboboxes incorrectly allowing editing.

- Misc
  - Fixed menu checkboxes not showing on Vista and Windows 7 when using the
    Classic Theme.
  - Dropping files/folders onto a path edit no longer changes the edit if the
    drop results in a new view.
  - Added "RE Examples" buttons to Grammar Item dialog.
  - Improved Open/Save dialog handling of file type options.

- Options
  - "Customize Commands" dialog's "Default" command now checks to see if
    shortcut is already in use.

- Picture Compare
  - "Difference Offset", "Flip", and "Rotate" are now persistent session
    settings.
  - Fixed handling of DIB, MSK, and RLE bitmap files.

- Registry Compare
  - Fixed loading .reg files with a '\' before hex data.
  - Fixed loading .reg files with a ']' in a key name.

- Scripting
  - FILE-REPORT (and TEXT-REPORT, etc.) commands will now accept a saved file
    compare session name instead of a pair of files.  E.g., "file-report
    layout:side-by-side output-to:printer MySession".
  - LOG command will now create the target folder if it doesn't exist.
  - Fixed support for STRIKEOUT-RIGHT-ORPHANS in TEXT-REPORT command.

–jeroen

via: Beyond Compare ChangeLog

Posted in *nix, Power User, Windows, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Vista, Windows XP | Leave a Comment »

Batch file to detect Windows version number

Posted by jpluimers on 2012/02/08

Most Batch files for detecting Windows versions try to parse the either the [WayBack] output fromVER  or the [WayBackoutput from SYSTEMINFO [WayBack], but forget that there many Windows installations are not English. Some even use WMIC, but [WayBackWMIC is only available for administrators and not available some flavours like XP Home.

Languages issues are always important to watch for. The Dutch Windows XP returns Microsoft Windows XP [versie 5.1.2600] which is just one word different from the English Microsoft Windows XP [Version 5.1.2600]. Other languages may differ even more.

This batch file tries to circumvent the language differences, uses VER and works at least with Dutch and English Windows versions of XP and 7, most likely with many other languages and versions as well.

On a Windows XP SP3 machine, it lists WindowsVersion=5.1.2600 and on a Windows 7 SP1 machine it lists WindowsVersion=6.1.7601.

One possible addition would be to [WayBack] detect x64 or x86.

The detection assumes that VER will emit the version in [angle] brackets, and uses two batch file for loops to get the text in between them using the [WayBacktokens and delims for loop parameters in the first for loop right behind the begin label and the second for loop right after the parse1 label.

Then it splits the remaining text using spaces at the parse2 label, and takes the right most portion using the [WayBackshift command at the parse3 label.

Many thanks to [WayBackRob van der Woude for a lot of interesting batch file documentation. Read the rest of this entry »

Posted in Batch-Files, Power User, Scripting, Software Development, Windows, Windows 7, Windows XP | Leave a Comment »

Outlook signature locations

Posted by jpluimers on 2012/02/07

When Google searching, most results for the Outlook 2003 Signature Folder Location AppData give you the wrong folder.

They mix environment keys like UserName, UserProfile, but should use AppData as that has been the base since at least Windows XP.

This is the correct folder for any Outlook version (2003, 2010, etc): %appdata%\Microsoft\Signatures

Making sure you use the right environment variable is very important, especially in large Windows based environments that often use roaming profiles and a mix of Windows environments.

For instance, at a client they have a mixed environment of Windows XP and Windows 7, with separate AppData locations for the two on a LAN:

  • Windows XP:
    \\server\DFS\share\Application Data
  • Windows 7:
    \\server\DFS\share\Application Data.v2

There is a very nice Wikipedia article on the Windows Environment variable that explains this situation in the synopsis.

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »

automatic logon in Windows 2003

Posted by jpluimers on 2012/01/27

At a client that still runs Windows Server 2003 (despite the fact that it is in the extended support phase now), I needed to enable automatic logon (one of the tools they run sometimes fails when nobody is logged on).

This was a bit more tricky than just reading [WayBack] How to turn on automatic logon in Windows (now at How to turn on automatic logon in Windows) and following these steps:

To use Registry Editor (Regedt32.exe) to turn on automatic logon, follow these steps:

  1. Click Start, and then click Run.
  2. In the Open box, type Regedt32.exe, and then press ENTER.
  3. Locate the following subkey in the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  4. Double-click the DefaultUserName entry, type your user name, and then click OK.
  5. Double-click the DefaultPassword entry, type your password, and then click OK.NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
    1. On the Edit menu, click New, and then point to String Value.
    2. Type DefaultPassword, and then press ENTER.
    3. Double-click DefaultPassword.
    4. In the Edit String dialog, type your password and then click OK.

    NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.

  6. On the Edit menu, click New, and then point to String Value.
  7. Type AutoAdminLogon, and then press ENTER.
  8. Double-click AutoAdminLogon.
  9. In the Edit String dialog box, type 1 and then click OK.
  10. Quit Registry Editor.
  11. Click Start, click Shutdown, and then type a reason in the Comment text box.
  12. Click OK to turn off your computer.
  13. Restart your computer. You can now log on automatically.

Since this depends on some registry settings, you need to make sure they are actually set.
And logging on as someone else will reset the DefaultUserName registry setting.

The article points to another article on “AutoAdminLogon looses DefaultUserName” to solve this using REGINI (and optionally REGDMP which can provide sample output for REGINI), but there is a much easier solution using RegEdit which – as Rob van der Woude points out – can be used unattended as well (besides: REGDMP cannot be downloaded any more, and REGINI requires an additional download).

This is how to do force the DefaultUserName to be reset after logon using RegEdit:

  1. Open an explorer Window in “%ALLUSERSPROFILE%\Start Menu\Programs\Startup
  2. Create a batch file “run-RegEdit-DefaultUserName.bat” there with this content:
    regedit /s Administrator-DefaultUserName.reg
  3. Create a text file “Administrator-DefaultUserName.reg” in the same directory with content like this:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    "DefaultUserName"="Administrator"

Replace “Administrator” with the username you are actually using.

–jeroen

Via: How to turn on automatic logon in Windows.

Read the rest of this entry »

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista | 2 Comments »

Alternate (offline) Google Chrome installer (Windows) – Google Help

Posted by jpluimers on 2012/01/06

Currently most software installers have a small bootstrap and during the actuall install will download only the files that are actually needed.

Often that is not convenient: slow or no network connection, repeated installs in a test environment, etc.

Luckily, a lot of software does have an offline installer (a.k.a. standalone installer).

Being no exception Google Chrome has two offline installers: one single user install, and one for all users on the same Windows machine.

It ends up at one of these download pages, each with a download link for the current version (which changes for every new version):

–jeroen

via: Alternate (offline) Google Chrome installer (Windows) – Google Help.

Posted in LifeHacker, Power User, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | 1 Comment »

Easy ways to show which Windows version/service packs are installed; via Super User: windows command line: can I tell Service pack number?

Posted by jpluimers on 2011/12/23

Sometimes you want to know which SP is installed on Windows with built-in tools only.

For end-users the fastest way is to start Winver, it will give you dialogs like these (left: XP with SP3, right: Windows 7 without any SP):

For command-line lovers, the one I like this most is this:

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

[WayBack] systeminfo can show a truckload of information, and [WayBack] findstr condenses this to what I need.

On Windows XP SP3, it shows this:

OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 3 Build 2600

On vanilla Windows 7, it shows this:

OS Name: Microsoft Windows 7 Ultimate
OS Version: 6.1.7600 N/A Build 7600

–jeroen

via: [WayBackwindows command line: can I tell Service pack number? – Super User.

Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »

VMware KB: Sharing a folder from your Mac to a virtual machine

Posted by jpluimers on 2011/12/23

Note that Sharing a Mac folder through VMware Fusion to a Windows VM works, but is:

  1. not fast
  2. eats a lot of Mac resources
    (it would get the fan of my MacBook Air running like mad when copying about 1Gigabyte of files – about 20-thousand files total; a robocopy /mir sync when nothing is changes takes a whopping 5 minutes)

This is how you do it:

To configure a shared folder in a Windows virtual machine:

  1. Launch VMware Fusion.
  2. Power on the virtual machine.
  3. Click Virtual Machine > Settings.
  4. Click Sharing.
  5. Select Share folders on your Mac.
  6. Click the + button.
  7. Browse to the folder on the Mac that will be shared with the virtual machine and click Add.

Shared folders can be accessed via the VMware Shared Folders shortcut on the Windows desktop or the mapped network drive Z:.

–jeroen

via VMware KB: Sharing a folder from your Mac to a virtual machine.

Posted in Fusion, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, Power User, VMware, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | Leave a Comment »

Windows: killing the Zone.Identifier NTFS alternate data stream from a file to prevent security warning popup

Posted by jpluimers on 2011/11/25

The Zone.Identifier NTFS alternate data stream (ADS) is appended to Internet downloads by browsers, and inserted by most decompressors when expanding such downloads.

NTFS alternate data streams are a perfect way to hide data, support Mac OS data forks (which used them to support resource fork meta data tagging long before NTFS alternate data streams were introduced), or to append meta-data to files.

It is a known ADS used to show a security warning when you run executable content that has been downloaded.
That warning can be annoying, or hang your application which it is started from a service, so further below is a batch file that kills the stream.

You cannot use type for displaying NTFS alternate data streams, but redirection through more or using notepad is fine.

This shows the Zone.Identifier NTFS alternate data stream for a single file:

more < %1:Zone.Identifier

When you want to see the ADS of many files, then just use NirSoft’s AlternateDateStreams utility.

You should only kill an Zone.Identifier NTFS alternate data stream when you have verified that the downloaded executable content (which nowadays is much more than just an executable) is verified to be safe.

An easy way to kill any NTFS alternate data stream is to copy it to a FAT32 device and back: FAT does not support alternate data streams. Drawback: it modifies the timestamp of your file as FAT has a smaller time resolution than NTFS has.

This batch file kills  the Zone.Identifier NTFS alternate data stream using the SysInternals streams tool:

@echo off
  if !%1!==!! goto :end
  :: use caret before pipe to hide the pipe from the outermost command in the batch file
  for /f "usebackq tokens=1" %%d in (`streams.exe %1 ^| find "Zone.Identifier:$DATA"`) do (
    goto :kill
  )
  goto :end
:kill
  streams -d %1
:end

and this batch file lists the Zone.Identifier NTFS alternate data streams:

@echo off
  if !%1!==!! goto :end
  :: use caret before pipe to hide the pipe from the outermost command in the batch file
  for /f "usebackq tokens=1" %%d in (`streams.exe %1 ^| find "Zone.Identifier:$DATA"`) do (
    goto :list
  )
  goto :end
:list
  streams.exe %1 | find ":"
:end

Note that the $DATA in the above batch files is not part of the NTFS alternate data stream name, but explains what kind of data is in the stream.
I have not found other types yet, but if you do, please leave a comment (preferably with a link).

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows Vista, Windows XP | 2 Comments »

Not so convenient: after XP there is no more WebCam viewer in Windows (via: How can I take a picture with my webcam in Windows 7? – Super User)

Posted by jpluimers on 2011/11/14

Microsoft removed the WebCam viewer from Windows on all versions released after XP.
Very inconvenient, as it was very light weight, and most webcam software isn’t.

William describes in his answer to How can I take a picture with my webcam in Windows 7?, there is a small AMcap sample in the Microsoft DirectX SDK that works very well.
He also points to 2 download locations where you can get the compiled version (the SDK only has the source code).

–jeroen

Via: How can I take a picture with my webcam in Windows 7? – Super User, there is a

Posted in Power User, Windows, Windows 7, Windows Vista | Leave a Comment »