View Single Post
Old 04-18-2008   #8 (permalink)
Mark E. Schill
Guest


 

Re: Executing PS1 files by double clicking on them

I have the same problem because I create powershell scripts that I send
to my colleagues to run. I have been toying around with the idea of
creating a small application that I would associate the .ps1 extension
to and accept the PowerShell script as a parameter. So you would
double-click the .ps1 file and it would bring up a window asking you to
confirm that you really want to do it and execute the script in
PowerShell if you accept. And it would have lots of warnings.


Mark

Marco Shaw [MVP] wrote:
Quote:

> greatbarrier86 wrote:
Quote:

>> I need some advice. Occasionally, some of my scripts are run by the
>> technician manually and are not automatically invoked. In the case of
>> powershell files, i am using either a VBS file or a BAT file to invoke
>> the PS1 file because PS1s are designed to open with notepad by
>> default. Can anyone offer me some advice as to a way that would allow
>> the tech to just execute the PS1 file by clicking on it?
>
> There is another way, I'm just not interested in making it public with
> my name attached to it... ;-)
>
> Marco
>