powershell script path

C++
# Powershel 3+
$PSScriptRoot

# Powershell 2-
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
Source

Also in C++: