View Single Post
Old 03-28-2007   #2 (permalink)
Brandon Shell


 
 

Re: Can you drag-n-drop a file on top of a PS script to run the script?

Short Answer (by default)
No,No,Yes (but be careful of signing.)

Long Answer
By default powershell does not register .ps1 to powershell... they get
registered to notepad. This is a security measure. You can however associate
..ps1 with Powershell and it will work although atm I cant test all your
scenarios because I am using Vista... Its a tad different in those areas.

"Jen Taylor" <jtaylor23@aol.com> wrote in message
news:%23PPS4gOcHHA.2300@TK2MSFTNGP06.phx.gbl...
> With VBScript files, you can drag-n-drop another file on top of the
> VBScript file. This executes the VBScript and then the path of the
> dropped file is passed in as an argument to the script.
>
> You can also put VBScript scripts into your Send To folder in your local
> profile, then "send" files to the script.
>
> Finally, wscript.exe can take a UNC path to a script in a remote shared
> folder and run scripts from the share.
>
> Are these tricks possible with PowerShell too?
>
> Thanks!
>
>
>
>


My System SpecsSystem Spec