Opinionated Software

… we have opinions about everything!

Archive for the ‘Windows’ Category

Powershell ISE Editor Tip —

Here’s an interesting tip – if you need an editor on a Windows server that handles Unix line endings you can use Powershell ISE … it’s not installed by default, but open a Powershell prompt and enter these commands:  Import-Module ServerManager Add-WindowsFeature PowerShell-ISE And you will have a half-decent editor.

fsutil one-liner —

fsutil fsinfo ntfsinfo X: where X: is the drive letter gives output like this: NTFS Volume Serial Number : 0x101051a010518e1a NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x0000000074498860 Total Clusters : 0x000000000e89310c Free Clusters : 0x000000000447f222 Total Reserved : 0x00000000000016e2 Bytes Per Sector : 512 Bytes Per Physical Sector : 512 […]

Delete Too Long File Paths on Windows —

The 260 character limit on the file path makes deleting the file from applications like Weblogic problematic (especially the .patch_storage sub-folder structure). As a result the PeopleTools DPK “cleanup” command doesn’t actually clean everything up. Use: ROBOCOPY D:\TEMP\EMPTY .patch_storage /PURGEROBOCOPY D:\TEMP\EMPTY .patch_storage /PURGE or /MIR to delete the files recursively, where D:\TEMP\EMPTY is an empty […]

Opening UTF-16LE files in Perl —

Placeholder for useful code snippet: open my $fh, ‘<:raw:perlio:encoding(UTF-16LE):crlf’, $filenameopen my $fh, ‘<:raw:perlio:encoding(UTF-16LE):crlf’, $filename which will convert CR/LF combinations to LF only. Alternatively, to keep them intact: open my $fh, ‘<:raw:perlio:encoding(UTF-16LE)’, $filenameopen my $fh, ‘<:raw:perlio:encoding(UTF-16LE)’, $filename Useful for reading Windows registry export files, SQL server log export files etc.

Windows “start” command and quoting —

Well you learn something new every day! I just discovered that if the first parameter to the windows “start” command is quoted, then it assumes that is the title of the Window. This can be particularly annoying if the path to the executable you are trying to start contains spaces e.g. “C:\Program Files (x86)\Microsoft Office\Office14\winword.exe” […]