New-BootsWindow in tutorial--CommandNotFound

Jun 20, 2009 at 2:36 PM

(I had some further problems with the tutorial, and am breaking them out into individual threads)

Vista SP2, CTP3, I have the PowerBoots module loaded, I can get-module PowerBoots and see its functions.  But the first line of code in the tutorial doesn't run.

New-BootsWindow shows CommandNotFound.  It's also not in the Exported Cmdlets.

 

Coordinator
Jun 21, 2009 at 3:08 AM
Are you using PoshConsole? If so, you need to copy the PoshWPF.dll from
PowerBoots over the top of the old one in the PoshConsole folder :)
--
Joel
Sep 20, 2009 at 9:08 AM

I had the same issue.  After reading the blog at http://huddledmasses.org/powershell-modules-metadata-and-mysteries/ , I was able to correct this issue by using the following in the PowerBoots.psd1 file instead of what was provided in the download.

NestedModules="PoshWpf","PowerBoots.psm1"

This corrected the issue on XP SP3 with the recently released PowerShell v2 RC.  Had to resign files with self-signed certificate (see about_signing) too as I run under AllSigned ExecutionPolicy.  The samples still produced a few warnings and error messages, but for the most part this worked.

Hope this helps!

 

Coordinator
Sep 22, 2009 at 3:37 AM
Thanks for figuring that out :) I'm going to have to dig into this and file some bugs against it if the RC bits don't load the same modules the way that Windows 7 does, that's going to be frustrating.
--
Joel
Nov 8, 2009 at 2:38 PM

Hi, i have the same error :
 PowerBoots full GPL3 (includes Visifire 2.2 chart controls) Jun 19
 Under Windows Xp sp3 fr, posh v2, fx 3.5  + PSCX 1.2
 ExecutionPolicy = AllSigned
 Administrator account.


Import-Module powerboots
#AVERTISSEMENT : Out-BootsWindow disabled in MTA mode. (Must run PowerShell with -STA switch to enable)

gcm new-b* -type cmdlet
#empty list

$List=get-module #2 modules
$List[1]
# ModuleType Name                      ExportedCommands
# ---------- ----                      ----------------
# Manifest   powerboots                {Add-BootsFunction, Get-BootsModule, Remove-BootsContentProperty, New-Bo...

$List[1].exportedcommands
#
# Name                           Value
# ----                           -----
# Add-BootsFunction              Add-BootsFunction
...
# Set-DependencyProperty         Set-DependencyProperty

Get-BootsAssemblies
#PoshWpf  loaded

cd powerboots\samples
.\Samples.ps1 1
->Exception
# : 102 Char : 19
# +    New-BootsWindow <<<<  -SizeToContent WidthAndHeight -Content {
 
Rver
# PSMessageDetails      :
# Exception             : System.Management.Automation.CommandNotFoundException: Le terme « New-BootsWindow » n'est pas
#                         reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vér
#                         ifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est
#                         correct et réessayez.
#                            à System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, Comman
#                         dOrigin commandOrigin)
#                            à System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, C
#                         ommandOrigin commandOrigin, Nullable`1 useLocalScope)
#                            à System.Management.Automation.CommandFactory._CreateCommand(String commandName, CommandOrig
#                         in commandOrigin, Nullable`1 useLocalScope)
#                            à System.Management.Automation.ExecutionContext.CreateCommand(String command)
#                            à System.Management.Automation.CommandNode.CreateCommandProcessor(Int32& index, ExecutionCon
#                         text context)
#                            à System.Management.Automation.CommandNode.AddToPipeline(PipelineProcessor pipeline, Executi
#                         onContext context)
#                            à System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList&
#                          resultList, ExecutionContext context)
#                            à System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, A
#                         rray input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
# TargetObject          : New-BootsWindow
# CategoryInfo          : ObjectNotFound: (New-BootsWindow:String) [], CommandNotFoundException
# FullyQualifiedErrorId : CommandNotFoundException
# ErrorDetails          :
# InvocationInfo        : System.Management.Automation.InvocationInfo
# PipelineIterationInfo : {}
 

How to load the New-BootsWindow cmdlet ?

Coordinator
Nov 8, 2009 at 9:38 PM

OH! guys, I'm so sorry, I forgot all about this -- I fixed it, and just need to release a new version.

Basically, in the psm1 file, near the bottom, there's a check wrapped around the Export-ModuleMember which isn't needed anymore now that XP is past CTP3! 

So, while you wait for me to release, you can fix it. Search for "CTP3" in the PSM1 script, and comment out the condition so they always get exported.

Nov 9, 2009 at 8:59 AM

Thank you :-)

Jun 7, 2010 at 1:50 PM

Even after commenting it out, I still get the -STA message and New-BootsWindow is inaccessible. Even tried commenting out the -STA section and all that did is remove the error message. :)

Aug 10, 2010 at 10:06 PM
Glacialis, have you tried Import-Module Powerboots\PoshWpf ? New-BootsWindow works after doing that.