Page 1 of 1 1
Topic Options
#179027 - 07/08/09 07:50 PM folder of user's profile
alexchevrier Offline
Fresh Scripter

Registered: 02/11/11
Posts: 15
Loc: Quebec
How can I know the folder of my users's profiles ? I must do a backup of the Microsoft Word normal.dot file in the folder :

C:\Documents and Settings\[user account]\Application Data\Microsoft\Modèles\Normal.dot

[user account] is my problem, it should be @UserId, but in some case it's [user account].000 or [user account].domain

I can't find a macro for the profile folder, is there one that I missed or a work around ?

Top
#179028 - 07/08/09 07:53 PM Re: folder of user's profile [Re: alexchevrier]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4261
Loc: USA
try %userprofile%

or check the registry

Top
#179029 - 07/08/09 07:58 PM Re: folder of user's profile [Re: alexchevrier]
Mart Moderator Offline
KiX Supporter
*****

Registered: 02/03/27
Posts: 4612
Loc: The Netherlands
There is no macro for these folders in kix. Windows has one and it's is called %userprofile% you can use this in your kix scripts.

There is also a registry key that hold the location of these folders.

 Quote:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#179039 - 07/08/09 10:20 PM Re: folder of user's profile [Re: alexchevrier]
Witto Offline
MM club member
*****

Registered: 04/09/29
Posts: 1828
Loc: Belgium
 Code:
BREAK ON
DIM $objFolderItem
$objFolderItem=CreateObject('Shell.Application').Namespace(26).Self
$objFolderItem.Name ?
$objFolderItem.Path ?
Get $so

GetSpecialFolders() - Returns the Name and Path of Special Folders

Top
#179041 - 07/08/09 10:21 PM Re: folder of user's profile [Re: Witto]
Mart Moderator Offline
KiX Supporter
*****

Registered: 02/03/27
Posts: 4612
Loc: The Netherlands
And an other one \:D
There are lots of ways to get to where you want to be.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (green78) and 144 anonymous users online.
Newest Members
Keris2112, Jorromans, qrstuv140696, Bloodboy, NIJAKIX
17451 Registered Users

Generated in 0.085 seconds in which 0.05 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org