From: Allen on 4 Jan 2010 09:08 I want to get the path of my current .vbs files I use below script to get the path Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.GetFolder(".\").Path But it only work when I run the script directly. If I drag a folder to the script it return "Document and setting\User" Please help / Allen
From: Richard Mueller [MVP] on 4 Jan 2010 10:16 "Allen" <allenywl(a)hotmail.com> wrote in message news:9323266E-788D-4B8C-9D44-59613ED9110D(a)microsoft.com... >I want to get the path of my current .vbs files > > I use below script to get the path > > Set objFSO = CreateObject("Scripting.FileSystemObject") > objFSO.GetFolder(".\").Path > > But it only work when I run the script directly. If I drag a folder to the > script it return "Document and setting\User" > > Please help / Allen Use the Wscript object: Wscript.Echo Wscript.ScriptFullName Richard Mueller
From: Allen on 5 Jan 2010 09:14 Work prefect. Thanks/Allen "Richard Mueller [MVP]" <rlmueller-nospam(a)ameritech.nospam.net> wrote in message news:euBruDVjKHA.4912(a)TK2MSFTNGP02.phx.gbl... > > "Allen" <allenywl(a)hotmail.com> wrote in message > news:9323266E-788D-4B8C-9D44-59613ED9110D(a)microsoft.com... >>I want to get the path of my current .vbs files >> >> I use below script to get the path >> >> Set objFSO = CreateObject("Scripting.FileSystemObject") >> objFSO.GetFolder(".\").Path >> >> But it only work when I run the script directly. If I drag a folder to >> the script it return "Document and setting\User" >> >> Please help / Allen > > Use the Wscript object: > > Wscript.Echo Wscript.ScriptFullName > > Richard Mueller >
|
Pages: 1 Prev: List user properties Next: multiline email body test with vbscript ?/ |