|
#1
|
|||
|
|||
|
Session Variable for Windows "Default User" folder?
I need to store some files in the "Default User" folder of Windows so that any new users added to the system will have those files included in their new user profile.
However, whilst there are Session Variables for things such as "My Documents" (%MyDocumentsFolder%) and "\All Users\Documents" (%CommonDocumentsFolder%), I can not find a Session Variable for the "Default User" folder. Assuming Drive C:, the folder in question would be "C:\Documents and Settings\Default User" for Windows XP, and "C:\Users\Default" for Windows Vista. Is there such a Session Variable? Or, if not, what would be the best way to "construct" this folder location using other variables such as "%SystemDrive%" etc? Any help appreciated. |
|
#2
|
||||
|
||||
|
Quote:
Construct it by commondocumentsfolder%\\..\\..\\defaultuser |
|
#3
|
|||
|
|||
|
Wow. That seems so obvious. It's almost embarrassing I didn't think of it myself. Thanks jassing. I'll give that a try.
. Last edited by freddy; 09-26-2008 at 05:37 PM. |
|
#4
|
||||
|
||||
|
Quote:
single '.' means "this directory so "dir ." is the same as "dir" as it defaults to the current directory ".." means "parent directory" -- you can use it in windows, anything that uses the file system. it's also used in unix/linux... whenever you want the "directory above" that's ".." and you can use them multiple times to "walk" the tree.. |
|
#5
|
|||
|
|||
|
Hehe, yep, born and bred on PCs as early as the 80s, I've done my fair share of DOS stuff over the years. Even today I am constantly in the command prompt doing things and getting the jobs done. In a lot of cases Windows seems to be merely a pretty background utility. So I am familiar with the "." and ".." stuff. For example, I can't recall how many times in my life I would have typed "cd.." <Enter>. Hence my statement that it's almost embarrassing I didn't think of what you suggested myself.
Thanks again. I am yet to test it out, but on the surface there's no reason for it not to work. . Last edited by freddy; 09-28-2008 at 07:08 PM. |
|
#6
|
||||
|
||||
|
It will -- I've used that in scripts (lua) GUI's (VB, VFP, etc) and in C/C++ -- works fine in "windows" too.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do Session Variables work? | Adam | Setup Factory 8.0 FAQ | 0 | 04-28-2008 01:15 PM |
| multiple locations. | wasim21k | AutoPlay Media Studio 6.0 | 15 | 04-04-2007 10:43 AM |
| Eearliest point to initialize custom session variable | Se7en | Setup Factory 7.0 Discussion | 0 | 03-15-2006 09:12 AM |
| cookies | goukilord10 | AutoPlay Media Studio 5.0 | 6 | 05-20-2005 05:08 PM |
All times are GMT -6. The time now is 05:56 AM.









Linear Mode

