문제

I've created a custom Powershell provider. However, currently there are a few steps people have to do to get it working on a user's computer:

  1. configure Powershell to run against .Net 4 (add a config file in c:\Windows\System32\WindowsPowerShell\v1.0)
  2. add a custom formatter (to the System32 for c:\Windows\System32\WindowsPowerShell\v1.0).
  3. register the snap-in.

The remainder setup steps are completed by a custom powershell script.

I was wondering if anyone could share their experiences on simplifying the process. Ideally I'd like people to run from a single command (ideally a CommandLet that's completes all the above steps.

Has anyone got any Links or Suggestions or Best Practise they could share?

도움이 되었습니까?

해결책

I've found the following snippets that may help.

VS Command prompt variables

For the Visual Studio Command you could try Lee Holmes' http://poshcode.org/2176 or the Powershell Communit extensions (PSCVX). Both from https://superuser.com/questions/104868/run-visual-studio-command-line-tools-in-windows-powershell.

After that it's just the formatter and/or registering the snap-in.

Configure Powershell to use .Net4

How can I run PowerShell with the .NET 4 runtime?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top