Re: Getting path...
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Fri, 20 May 2005 05:05:43 -0500
"Al Dunbar [MS-MVP]" <alan-no-drub-spam@xxxxxxxxxxx> wrote in message
news:OIWzf1OXFHA.3572@xxxxxxxxxxxxxxxxxxxxxxx
>
> "McKirahan" <News@xxxxxxxxxxxxx> wrote in message
> news:joKdnZ3ID5E2MhHfRVn-qw@xxxxxxxxxxxxxx
> > "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@xxxxxxxxx> wrote in message
> > news:eK$GAQIXFHA.3996@xxxxxxxxxxxxxxxxxxxxxxx
> > > Vince <vincent@ wrote:
> > >
> > > > hi there!
> > > >
> > > > is there a way to get the absolute path of a running wsh script ?
> > >
> > > WScript.Echo WScript.ScriptFullName
> > > Set oFSO = CreateObject("Scripting.FileSystemObject")
> > > sScriptPath = oFSO.GetParentFolderName(WScript.ScriptFullName)
> > > WScript.Echo sScriptPath
> > >
> > >
> > > > another question, is it possible to develop graphical interfaces
> > > > using wsh or we have to migrate to VB?
> > >
> > > You could use an Internet Explorer object for the GUI, or switch
> > > to HTA:
> > >
> > >
> >
>
http://groups.google.co.uk/group/microsoft.public.scripting.wsh/msg/aaf39e1e
> > 72537063?dmode=source&hl=en
> > >
> > >
> > > --
> > > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> > > Administration scripting examples and an ONLINE version of
> > > the 1328 page Scripting Guide:
> > > http://www.microsoft.com/technet/scriptcenter/default.mspx
> >
> > Or:
> >
> > Dim sPath
> > sPath = WScript.ScriptFullName
> > sPath = Left(sPath,InStrRev(sPath,"\"))
> > WScript.Echo sPath
>
> Or:
>
> Dim sPath
> sPath = WScript.ScriptFullName
> sPath = FSO.getFileName(sPath)
> WScript.Echo sPath
>
> /Al
That requires:
Set FSO = CreateObject("Scripting.FileSystemObject")
And it returns the filename not the path.
.
- Follow-Ups:
- Re: Getting path...
- From: Al Dunbar [MS-MVP]
- Re: Getting path...
- References:
- Getting path...
- From: Vince
- Re: Getting path...
- From: Torgeir Bakken \(MVP\)
- Re: Getting path...
- From: McKirahan
- Re: Getting path...
- From: Al Dunbar [MS-MVP]
- Getting path...
- Prev by Date: caller user name
- Next by Date: Re: splitting a big file int several smaller ones...
- Previous by thread: Re: Getting path...
- Next by thread: Re: Getting path...
- Index(es):
Relevant Pages
|
Loading