PoshCode Archive  Artifact [ce45b6bef4]

Artifact ce45b6bef4bda1b07956ea53dd6e414c3084e97648e437f89b626ad787dbfd60:

  • File New-DesktopIni.ps1 — part of check-in [4102f942ce] at 2018-06-10 13:02:00 on branch trunk — Create a desktop.ini in your PowerShell folder setting the icon and messing with the display name. (user: unknown size: 677)

# encoding: ascii
# api: powershell
# title: New-DesktopIni
# description: Create a desktop.ini in your PowerShell folder setting the icon and messing with the display name.
# version: 1.0
# type: class
# license: CC0
# x-poshcode-id: 1842
# x-archived: 2010-05-17T00:10:36
#
#
$di = [System.IO.FileInfo]"$(split-path $Profile -Parent)\desktop.ini"
set-content $di "[.ShellClassInfo]`r`nLocalizedResourceName=1$([char]160)WindowsPowerShell`r`nIconResource=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe,0`r`n[ViewState]`r`nFolderType=Documents"
$di.Attributes = $di.Attributes -bor [IO.FileAttributes]"System,Hidden" -bxor [IO.FileAttributes]"Archive"