三年半の格闘の末に僕が見たもの、あるいは試行錯誤の覚書、すなわち二番煎じ。
PowerShell 3.0以上のバージョンを使用すること。2.0以下のバージョンは、書き捨ては仕方ないとしても、保守対象のスクリプトを書くべきではないし、あらゆる言及に値しない。全力でバージョンアップをしろ。
| Option Explicit | |
| Sub TestRun() | |
| Dim wf As WorksheetFunction: Set wf = WorksheetFunction | |
| Dim rng As Range, r As Range, arr As Variant | |
| For Each rng In BorderedCells(Sheet1.UsedRange) | |
| Debug.Print "[" & rng.Address(False, False) & "] "; | |
| For Each r In rng.Rows | |
| If r.Cells.Count > 1 Then |
| param( | |
| [ValidateSet("CUI", "GUI")] | |
| [string]$RunningStyle, | |
| [string]$Text | |
| ) | |
| ### bootstrap | |
| if (-not $RunningStyle) { | |
| if ((Get-Host).Name -eq "ConsoleHost") { | |
| Write-Host "Loading..." |
| @echo off | |
| set sln=SampleApp | |
| set proj=SampleApp | |
| set conf=Release | |
| set plat=x86 | |
| set publisher=Dummy Inc. | |
| set product=Sample Application | |
| set version=0.1.2.3 |
Strawberry Perl をインストール。インストール先はデフォルトとする。
毎度おなじみインストール確認。
perl -v