Home All Groups Group Topic Archive Search About


Author
26 Oct 2007 10:25 AM
pawelq
Hi
I've some problem with my script , i need to change the name mapped
drive in Win 2000 and Win 98, and I don't know how to do it.
I try in script use :

strDrive ="Q:"
  Set objShell = CreateObject("Shell.Application")
  objShell.NameSpace(strDrive).Self.Name = "Home"

but it only work's in Win Xp. In Win 98 show error about no exists
object NameSpace, something like this.

Please help :(

Author
5 Nov 2007 10:19 AM
RemS
Show quote
"paw***@gmail.com" wrote:

> Hi
> I've some problem with my script , i need to change the name mapped
> drive in Win 2000 and Win 98, and I don't know how to do it.
> I try in script use :
>
> strDrive ="Q:"
>   Set objShell = CreateObject("Shell.Application")
>   objShell.NameSpace(strDrive).Self.Name = "Home"
>
> but it only work's in Win Xp. In Win 98 show error about no exists
> object NameSpace, something like this.
>
> Please help :(
>

my guess is that  the object NameSpace is not available in non NT-based
Operatingsystems

For the Windows 2000 computers use this syntax:
objShell.NameSpace(strDrive & "\").Self.Name = "Home"

\Rems

AddThis Social Bookmark Button