To solve these many problems I have have created myself a small Powershell script to do it for me.
#Create Windows XP Quicklaunch bar Show Desktop icon
#requires Powershell 1.0
$FileName = "$env:appdata\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
New-Item -ItemType file $fileName
Add-Content $FileName "[Shell]"
Add-Content $FileName "Command=2"
Add-Content $FileName "IconFile=explorer.exe,3"
Add-Content $FileName "[Taskbar]"
Add-Content $FileName "Command=ToggleDesktop"
And in case Brandon Shell finds this post, here's the same thing in three lines,so he doesn't taunt me, and call me a $noob. (Make sure if you cut and paste it to correct any line wrapping problems).
$FileName = "$env:appdata\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
$Content="[Shell]`nCommand=2`nIconFile=explorer.exe,3`n[Taskbar]`nCommand=ToggleDesktop"
Set-Content $filename $content
Of course you could collapse that down to one line
Set-Content "$env:appdata\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" "[Shell]`nCommand=2`nIconFile=explorer.exe,3`n[Taskbar]`nCommand=ToggleDesktop"
but that's getting pretty silly isn't it.
0 comments:
Post a Comment