|
|
|||||||
Please, i need help! See this code and help me: $user_dep=GetObject("LDAP://cn=user.department,cn=user.samAccountname,ou=users,dc=aaa,dc=com") use g: "\\server" +$user_dep + "$" And not map...Why? Please |
||||||||
|
|
|||||||
Well...Im not an LDAP expert but I couldnt get the query line you posted to return anything. There was also a missing "\" in the drive mapping statement. I was able to get the below code to work in my env....Give it a shot. Code: $user_dep=GetObject("LDAP://CN="+@FullName+",OU=users,DC=aaa,DC=com") |
||||||||
|
|
|||||||
No Citrix, error in use..????... |
||||||||
|
|
|||||||
Rod Probably the easiest thing to do is copy and save this script from Chris. KiXforms - Active Directory Browser http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=91082 You will need to download and install KiXforms DLL from here http://www.kixforms.com Then when you run it you can browse to the object you want and copy/paste the LDAP location into your script. |
||||||||
|
|
|||||||
Please NTDOC! I did not understand. What I must after make to catch the code? And the archive kixforms.dll? What I must make with it? Forgive me, I am new in kix |
||||||||
|
|
|||||||
copy the script that Chris posted on the board at the link I provided. Then save that script in a text file and give it a name. Then download the KIXFORMS from the KiXforms link I provided. Open the file and extract it to your local system. Copy the DLL to your %windir%\system32 folder then run REGSVR32.EXE KIXFORMS.DLL to register it. Then in a DOS window where you saved the file from Chris. run something like C:\SCRIPTS\KIX32.EXE ADBROWSER.KIX Which should then open a GUI window you can use to browse your AD and copy paths with it. |
||||||||
|
|
|||||||
Whel....!!!! I don't no... Error in line 29 and 43 and 44...i'm desesperaid Sorry friend... |
||||||||
|
|
|||||||
Please post what your code is. I don't know what you have on those lines. Please use the CODE TAGS of Instant UBB Code to keep the code formatting when posting. |
||||||||
|
|
|||||||
Whel, i'm copy code to this site. CTRL+C / CTRL+V...accurately equal |
||||||||
|
|
|||||||
Rod, Please post the contents of your script here on the board so that we can see what is on those lines you said give errors. We can't see the code, so we have no idea what is going on. |
||||||||
|
|
|||||||
no friend, sees well, forgives me: this error is giving in script of chris s., that you indicated me above. |
||||||||
|
|
|||||||
Please read ABC's of KiXtart board etiquette and message to new forum users , especially Section F. It doesn't help us if you say there's an error and then don't even adequately describe the error. did youfollow the instructions given to you and did each step succeed? Did the DLL register correctly? Do you even see a form? Did you copy the code correctly, see the FAQ forum for info on this. |
||||||||
|
|
|||||||
Rod... The code snippet I posted does work. I tested it in my domain at work. My guess is you dont know what the correct path of the user object is and thats probably why Doc is trying to get you to use the kixforms script to get the path. Is the user object in the users OU or is it in a different OU? That will effect where you query the dept from. |
||||||||
|
|
|||||||
Sorry Sealeopard... Citrix and NTDOC, this error is in line 29 = $imglarge.imagesize = 32,32 |
||||||||
|
|
|||||||
Yo still did not answer any of the other questions. Did the DLL get registered correctly? What Kixtart and KiXforms version? |
||||||||
|
|
|||||||
Ok Sealeopard, thanks... DLL registered ok and versions of kix is: Kixtart - 4.22 Kixforms - 2.2.0 |
||||||||
|
|
|||||||
I think that this is what you're ultimately after... Code:
|
||||||||
|
|
|||||||
No map Chris... |
||||||||
|
|
|||||||
Is the value for $user_dep correct? |
||||||||
|
|
|||||||
Rodtex, You are not very helpful with the level of info you give. Why don't you break up the task into sections and test each one, repiorting the results of each. What does the var $user_dep return? Does it work if you hard code the USE statement? |
||||||||
|
|
|||||||
Whel, a value of return is: $user_dep... I don't understending... |
||||||||
|
|
|||||||
Run this and post your results... Code:
|
||||||||
|
|
|||||||
Ok Chris, tks... @error = -2147221014 | Moniker can not open file Username: blanck Department: blanck |
||||||||
|
|
|||||||
Please run this script and post the results... Code:
|
||||||||
|
|
|||||||
I find that: GetObject("LDAP://CN=USERNAME,OU=Users,DC=aaa,DC=com") will not work when executing this code on a client computer unless you also specify a domain or server name as part of the LDAP string. GetObject("LDAP://NetBIOSDomain/CN=USERNAME,OU=Users,DC=aaa,DC=com") or GetObject("LDAP://server/CN=USERNAME,OU=Users,DC=aaa,DC=com") This tells where the LDAP bind should take place. |
||||||||
|
|
|||||||
Hey Chris, very tks to help me... Error in execute script is: 9 | the address of the blocks of storage control is invalid And Howard, this option not valid, no map... |
||||||||
|
|
|||||||
I have found that I have to use @FullName to get results...The USERID does not work. Not sure if it is just my enviroment...But if not, then you all are telling him to use USERID which may not be working. |
||||||||
|
|
|||||||
Well, with the TranslateName UDF we are inputing the user information using WINNT and attempting to translate to a fully-qualified LDAP path. I think at this point we need some more basic information. What is the operating system of the computer running the script? What is the directory environment (2000 AD, 2003 AD, NT 4)? |
||||||||
|
|
|||||||
AD 2003 |
||||||||
|
|
|||||||
and... What is the operating system of the computer running the script? |
||||||||
|
|
|||||||
Windows 98, Windows 2000 and Windows XP (Brazilian version too) |
||||||||
|
|
|||||||
Which OS are you testing on right now? ADSI is not installed on Windows 98. |
||||||||
|
|
|||||||
Win 2K Pro |
||||||||
|
|
|||||||
Are you able to run the script the NTDOC talked about in this post: http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB13&Number=116164&Forum=UBB13&Words=KiXforms%20-%20Active%20Directory%20Browser&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=1week&Main=116161&Search=true#Post116164 |
||||||||
|
|
|||||||
Whel....!!!! I don't no... Error in line 29 and 43 and 44... I give up |
||||||||
|
|
|||||||
I just copied the script and ran it. There's nothign wrong with the script, which makes me believe that you didn't copy it correctly. See the FAQ Forum on how to copy/paste code form the board. |
||||||||
|
|
|||||||
Hey Sealeopard, I need CTRL+C/CTRL+V, but i don't understend, no work... Sorry...and tks for help |
||||||||
|
|
|||||||
Try this.... Click on the the link below and download the script and run it. As long as you have the kixforms.dll registered it should work fine. AD_Browser.kix Once you run the AD_Browser.kix script you should be able to browse to a user and copt the correct LDAP path of that user. |
||||||||
|
|
|||||||
Better yet...Try downloading this script. It is a stripped down version of the script that Chris posted above using the TranslateName UDF. That way it will work for any user no matter their AD directory. ldap_dept.kix The only thing you have to change in the script is the server to map the drive to...It is currently \\server\ and you will need to change this to your server name. Besides that there should be no needed changes. See if it works. |
||||||||
|
|
|||||||
A tip.. Copy the script to the clipboard.. Paste into Word/WordPad. Copy from Word/WordPad, and paste into NotePad. The code formatting should come out right. Kent |
||||||||
|
|
|||||||
I did not see what version of KiXtart you are using. With all the errors you mention with a script that others can execute, it makes me think that you are not running 4.02 or higher. Can you confirm the version of KiXtart you are running? |
||||||||
|
|
|||||||
Quote: |
||||||||
|
|
|||||||
Darn, I hate being worng. |
||||||||
|
|
|||||||
Quote: Just like Fonzie, you cannot even bring yourself to say it. |
||||||||
|
|
|||||||
I had another thought. Give this a try... Code:
|
||||||||
|
|
|||||||
nice one Chris. Seems to work great for me. I went ahead and uploaded a stripped down copy for our clipboard challenged friend. All that needs changed is the server in the use statement. ldap_dept2.kix |