Microsoft KB Archive/931082

= How to obtain a directory value in Profile Maker =

Article ID: 931082

Article Last Modified on 2/14/2007

-

APPLIES TO


 * Profile Maker Professional 8.0
 * Profile Maker Professional 9.0

-



INTRODUCTION
This article describes how to obtain a directory value in Desktop Standard Profile Maker.



MORE INFORMATION
To obtain a directory value and store it in an environment variable for use in Profile Maker, follow these steps:   Paste the following script in a text file. Then, save the text file as Obdirvalue.vbs. ' VBScript to determine the server name of the user's mapped ' home directory or the drive letter of the local home directory ' and pass that value to Profile Maker as an environment ' variable named %HomeServer%

' Enable error handling and prevent error messages On Error Resume Next

Dim objUser Dim wshShell Dim wshEnv Dim nPos Dim strServer

' get home directory from server Set objUser = GetObject(&quot;WinNT://%UserDomain%/%UserName%&quot;)

' parse out server name (or drive letter if local) nPos = InStr(3, objUser.HomeDirectory, &quot;\&quot;) strServer = Left(objUser.HomeDirectory, nPos-1)

' set value into volatile variable for Profile Maker ' will set to empy string if error occurred or value not set Set wshShell = Wscript.C  At the command prompt, move to the folder in which you saved the file in step 1. Type the following command, and then press ENTER:

cscript obdirvalue.vbs 

Keywords: kbhowto kbexpertiseinter kbinfo KB931082

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.