View Single Post
Old 05-16-2008   #10 (permalink)
Stiletto
Guest


 

Re: Executing PS1 files by double clicking on them

You shouldn't have to add anything to you shortcut. It should pass the file
to the script in the $args collection. Typically accessed as $args[0]

"Doug Griffin" wrote:
Quote:

> Hiyas. I have been experimenting with the shortcut method and it works great.
>
> I have a powershell script that I use routinely to to do make changes to an
> xml file. It would be great if I could create a shortcut that I could drag
> and drop the file on to and have the script do its stuff on this file.
>
> Is there a way I can pass the path of the file I drop onto the shortcut into
> my powershell script?
>
> I have tired %L which is one I use for registry context menus, but no go.
>
> Also, anyone know where I can find a list of what environment variables are
> availble? I can find stuff like %programfiles% easy enough with google, but
> can't find anything on what "%L" means (I think literal path), but I am after
> a list of all the environment variables and their meanings.
>
> thanks much for any advice
My System SpecsSystem Spec