g_sScriptPath = Wscript.ScriptFullName
g_sScriptName = Wscript.ScriptName
g_sScriptFolder = Left(g_sScriptPath, Len(g_sScriptPath) -
Len(g_sScriptName))
to find out where the script is running from.
I am writing an HTA that has VBScript, but it will not work with
ScriptFullName or ScriptName. Is there some other way I can find out what
folder the HTA is being run from?
Thanks,
Tolli
fldrActive= oFSO.GetAbsolutePathName(".\")
This seems to work on all versions. If you need to, you can easily verify
the existence of the script file in that folder to be sure that it is
program folder.
Regards,
Joe Earnest
"Tolli Lowell-Forker" <tlfork...@hotmail.com> wrote in message
news:#MBYnxoXCHA.2556@tkmsftngp12...
(where oHTA is the APPLICATION id)seems to do the same, but includes the
name of the file, so I still had to use fso.GetParentFolderName to parse the
path without using a brute force method from the string.
"Tolli Lowell-Forker" <tlfork...@hotmail.com> wrote in message
news:euxnAJqXCHA.2452@tkmsftngp11...
> Thanks, that worked from inside the HTA.
>
> Tolli
>
> "Joe Earnest" <joeea...@qwest.net> wrote in message
> news:#GvdC7oXCHA.2656@tkmsftngp11...
Thanks. That can prove useful.
Regards,
Joe Earnest
"MikeB" <m.takemeo...@verizont.net> wrote in message
news:##RM66qXCHA.1652@tkmsftngp08...
One thing with this though, is that in the value that it returns, all spaces
are converted into "%" characters...
Could someone suggest a quick way to replace all the % characters with space
characters?
Thanks,
Tolli
"MikeB" <m.takemeo...@verizont.net> wrote in message
news:##RM66qXCHA.1652@tkmsftngp08...
replace(window.document.location.pathname,"%20"," ")
Thanks
"Tolli Lowell-Forker" <tlfork...@hotmail.com> wrote in message
news:u0pufb2XCHA.4080@tkmsftngp08...
g_sScriptPath = replace(window.document.location.pathname,"%20"," ")
g_sScriptFolder = g_oFSO.GetAbsolutePathName(".\")
g_sScriptName = Right(g_sScriptPath, Len(g_sScriptPath) -
(Len(g_sScriptFolder)+1))
This gets me the Path, the Folder, and the File Name.
"Tolli Lowell-Forker" <tlfork...@hotmail.com> wrote in message
news:#Gbs$d2XCHA.2328@tkmsftngp09...