Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - powershell script so double click to start another app

Reply
 
Old 09-17-2009   #1 (permalink)
Xah Lee


 
 

powershell script so double click to start another app

Hi, is it possible to make a PowerShell script that can be double
clicked to run?

I like to have a icon that executes this

& "C:\Program Files (x86)\ErgoEmacs\bin\emacs.exe" -Q --load=~
\ErgoEmacs_Source\ergoemacs\ergoemacs\init.el --load=~\.emacs

i tried to save it as a file run_ergoemacs.ps1 but double click only
opened the file in a text editor.

Thanks.

Xah
∑ http://xahlee.org/

☄

My System SpecsSystem Spec
Old 09-17-2009   #2 (permalink)
Marco Shaw [MVP]


 
 

Re: powershell script so double click to start another app

There is a way to set .ps1 scripts themselves to run on a double-click.
Now, this goes against PowerShell's default security policies. You can,
however follow this:
http://stackoverflow.com/questions/2...atic-execution

I would prefer not to post anything directly myself that bypasses
PowerShell's default security, but that post can be found rather easily
doing a search.

Marco

"Xah Lee" <xahlee@newsgroup> wrote in message
news:554ead71-efe4-42d7-bd32-a28efcc57492@newsgroup
Quote:

> Hi, is it possible to make a PowerShell script that can be double
> clicked to run?
>
> I like to have a icon that executes this
>
> & "C:\Program Files (x86)\ErgoEmacs\bin\emacs.exe" -Q --load=~
> \ErgoEmacs_Source\ergoemacs\ergoemacs\init.el --load=~\.emacs
>
> i tried to save it as a file run_ergoemacs.ps1 but double click only
> opened the file in a text editor.
>
> Thanks.
>
> Xah
> ∑ http://xahlee.org/
>
> ☄
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Can't start VLC player with a double click on an attachement using windows mail Vista General
Script pauses when you click in the powershell text window PowerShell
Enable one click instead of double click selection Vista installation & setup
Single Click Instead Of Double Click Vista General
hot to change mouse to single click instead of double click to ope Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46