p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

vb_howto thread: My Documents


Message #1 by "Hector Minaya,TRI" <hminaya@t...> on Fri, 18 May 2001 10:15:43 -0400
Use the WScript shell object.  This is what I do in VBScript WSH scripts:

Dim oShell
Dim sDeskTop

Set oShell = CreateObject("WScript.Shell")
sDeskTop = oShell.SpecialFolders("DeskTop")
MsgBox sDeskTop

This will retrieve the DeskTop path for the currently logged in user.  The
following folders can be retrieved by using the SpecialFolders method (from
MSDN documentation):
AllUsersDesktop 
AllUsersStartMenu 
AllUsersPrograms 
AllUsersStartup 
Desktop 
Favorites 
Fonts 
MyDocuments 
NetHood 
PrintHood 
Programs 
Recent 
SendTo 
StartMenu
Startup 
Templates 



>> -----Original Message-----
>> From: Hector Minaya,TRI [mailto:hminaya@t...]
>> Sent: Friday, May 18, 2001 9:16 AM
>> To: VB_Howto
>> Subject: [vb_howto] My Documents
>> 
>> 
>> How can I find out via the registry or something like that 
>> the path to "My
>> Documents" in a NT4 or Win2k  machine.
>> 
>> 
>> Hector M.
>> 
>> 
>> $subst('Email.Unsub')
>> 

  Return to Index