![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Newbie: running external script I want to create a simple (.ps1) script and run it outside of Powershell (double-click the script from Windows and have it start automatically). Any ideas how to do this, much appreciated. Bill |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Newbie: running external script I find that it's no different from a .bat file. The shell opens up, executes, and then disappears unless you have something that pauses it. On my system, .PS1 files are by default associated to notepad.exe. Do a right-click Open With and then Choose Program... The path to PowerShell is in the variable $PSHOME. |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Newbie: running external script usually i create the .ps1 with arguments built in. Then at cmd prmopt, i type "powershell d:\<filename>.ps1 arguments" It is similar to "cscript d:\<filename>.vbs arguments" double click and it will disappear fast and u can't see results. "bill" <bill@discussions.microsoft.com> wrote in message news:A67B6FF7-5EAB-4633-B8B5-02D2F14EA719@microsoft.com... >I want to create a simple (.ps1) script and run it outside of Powershell > (double-click the script from Windows and have it start automatically). > > Any ideas how to do this, much appreciated. > > Bill > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Newbie: running external script Default behaviour is for a PowerShell script not to be runnable by double clicking - security feature. If need to run script outside shell best way is either as previous post states or create shortcut to powershell and add a command eg. C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -Command C:\Scripts\Monad\Services-Processes\stop-sqlservice.ps1 -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty "IT Staff" wrote: > usually i create the .ps1 with arguments built in. > > Then at cmd prmopt, i type "powershell d:\<filename>.ps1 arguments" > > It is similar to "cscript d:\<filename>.vbs arguments" > > double click and it will disappear fast and u can't see results. > > > > "bill" <bill@discussions.microsoft.com> wrote in message > news:A67B6FF7-5EAB-4633-B8B5-02D2F14EA719@microsoft.com... > >I want to create a simple (.ps1) script and run it outside of Powershell > > (double-click the script from Windows and have it start automatically). > > > > Any ideas how to do this, much appreciated. > > > > Bill > > > > > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling an external script. | rush | PowerShell | 12 | 01-26-2008 12:21 PM |
| Newbie question - Is there a script/command to do a backup of a di | dob | PowerShell | 4 | 01-03-2008 09:45 AM |
| Newbie Question: Here-Script with PowerShell | Raymund Hemmerling | PowerShell | 6 | 09-28-2007 03:34 AM |
| Newbie Needs Help With Folder script! | Mícheál | PowerShell | 4 | 04-16-2007 05:05 AM |
| Help on running a a script | Toxic | PowerShell | 3 | 12-05-2006 11:35 AM |