Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

%My Documents%?

Featured Replies

Is there a env. variable name for My Documents? :blushing: (in XP)

Edited by Mercury_22

no there is not however you should be able to in most cases use %userprofile%\My Documents\

note: to get a list of enviroment variables type set into a command prompt

Edited by spazmire11

No, you have to look in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal to determine the location.

Here's how to do with a batch file :

@echo off

verify other 2>nul

setlocal enableextensions

if errorlevel 1 (echo error : setlocal failed&goto :eof)

rem TAKE CARE : the whitespace after delims= is ONE TAB plus ONE SPACE, in that order, and there is only one line until the next green text

for /f "skip=4 tokens=1,2,* delims= " %%l in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal"') do (set MyDocs=%%n)

rem do something with that value HERE and not elsewhere

rem for example :

copy c:\windows\winamp.ini "%MyDocs%\winamp_backup.ini"

echo Winamp.ini saved into %MyDocs%

rem since i used setlocal to enable the "command extensions", all env vars are local to this batch

rem so they will be deleted when the batch ends, or when the endlocal command is called

rem the two next lines show you the problem : "MyDocs" is now empty...

endlocal

echo MyDocs=%MyDocs%

:eof

I find the Shell Folders key more successful, however in an unattended install, I am unsure as to when the USF key maps to it:

FOR /F "TOKENS=3* DELIMS=	" %%? IN ('REG QUERY "HKCU\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\SHELL FOLDERS" /V PERSONAL^|FIND ":\"') DO (SET MYDOCS=%%?)

Where DELIMS=<tab>"

  • Author
Here is a VBS Script for My Documents
Const MY_DOCUMENTS = &H5&
Dim Act, MyDoc, MyDocPath
Set Act = CreateObject("Shell.Application")
Set MyDocPath = Act.Namespace(MY_DOCUMENTS)
Set MyDoc = MyDocPath.Self
MsgBox MyDoc.Path, 0 + 32, "My Docsuments"

Thanks GUNS'! :thumbup

Edited by Mercury_22

  • Author

So if i want to use this to open a file from "My Documents" folder it will be...... :unsure:

EX: Workbooks.Open Filename:="MyDoc.Path\Filename.xls" ???

I am not sure what language that is but in VBS it would be this

VBS

Const MY_DOCUMENTS = &H5&
Dim Act, MyDoc, MyDocPath
Set Act = CreateObject("Shell.Application")
Set MyDocPath = Act.Namespace(MY_DOCUMENTS)
Set MyDoc = MyDocPath.Self
Act.Run(chr(34) & MyDoc & "\FILENAME_HERE" & chr(34)),1,True

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.