Inside a basic .PS1 script how do I determine the location of the PS1. What i am doing is I want to locate a config file which will be located in the same dir as the script.
On Jun 1, 11:18 am, "Jeff Jarrell" <jjarrelS...@yahoo.com> wrote:
> Inside a basic .PS1 script how do I determine the location of the PS1. What > i am doing is I want to locate a config file which will be located in the > same dir as the script.
"Alex Harden" wrote: > On Jun 1, 11:18 am, "Jeff Jarrell" <jjarrelS...@yahoo.com> wrote: > > Inside a basic .PS1 script how do I determine the location of the PS1. What > > i am doing is I want to locate a config file which will be located in the > > same dir as the script.
> On Jun 1, 11:18 am, "Jeff Jarrell" <jjarrelS...@yahoo.com> wrote: >> Inside a basic .PS1 script how do I determine the location of the PS1. >> What >> i am doing is I want to locate a config file which will be located in the >> same dir as the script.
"Alex Harden" <ahar...@gmail.com> wrote in message news:1180719264.315742.199840@q66g2000hsg.googlegroups.com... > On Jun 1, 11:18 am, "Jeff Jarrell" <jjarrelS...@yahoo.com> wrote: >> Inside a basic .PS1 script how do I determine the location of the PS1. What >> i am doing is I want to locate a config file which will be located in the >> same dir as the script.
While on the subject, I noticed things like UserAppDataPath are not relevant inside a cmdlet. Console.WriteLine("AppDir:"+Application.UserAppDataPath);
AppDir:C:\Documents and Settings\Administrator\Application Data\Microsoft Corporation\Microsoftr Windowsr Operating System\6.0.5430.0
I realize this is because it is probably using the Powershell.exe info as it is the exe. However, it would seem like this should be fixed somehow to allow cmdlets to use this info consistent with other applications. -- William Stacey [C# MVP] PowerLocker, PowerPad www.powerlocker.com
"Jeff Jarrell" <jjarrelS...@yahoo.com> wrote in message
news:%23g%23IzBGpHHA.3772@TK2MSFTNGP03.phx.gbl... | Inside a basic .PS1 script how do I determine the location of the PS1. What | i am doing is I want to locate a config file which will be located in the | same dir as the script. | | Thanks, | jeff | |
>> On Jun 1, 11:18 am, "Jeff Jarrell" <jjarrelS...@yahoo.com> wrote: >> > Inside a basic .PS1 script how do I determine the location of the PS1. >> > What >> > i am doing is I want to locate a config file which will be located in >> > the >> > same dir as the script.