alexchevrier
(Fresh Scripter)
2007-08-09 07:50 PM
folder of user's profile

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 ?


AllenAdministrator
(KiX Supporter)
2007-08-09 07:53 PM
Re: folder of user's profile

try %userprofile%

or check the registry


Mart
(KiX Supporter)
2007-08-09 07:58 PM
Re: folder of user's profile

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


Witto
(MM club member)
2007-08-09 10:20 PM
Re: folder of user's profile

 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


Mart
(KiX Supporter)
2007-08-09 10:21 PM
Re: folder of user's profile

And an other one \:D
There are lots of ways to get to where you want to be.