
paullauze
Active Members-
Posts
26 -
Joined
-
Last visited
About paullauze
- Birthday 02/20/1969
Profile Information
-
Location
USA
-
Interests
Visual Studio, C#, VB, Arduino, AutoIt
paullauze's Achievements

Seeker (1/7)
0
Reputation
-
This function to set Terminal Service information that i wrote a few years ago (with water's help), always worked in Windows XP, but no longer seems to work now that we changes over to Windows 7 machines. all other AD functions seem to work fine. could there be something missing in windows 7 like a .dll or something? Func _AD_SetTSProfile($sAD_User) If Not _AD_ObjectExists($sAD_User) Then Return SetError(1, 0, 0) Local $ID = $sAD_User If StringMid($sAD_User, 3, 1) <> "=" Then $sAD_User = _AD_SamAccountNameToFQDN($sAD_User) ; sAMACccountName provided $oAD_User.TerminalServicesProfilePath = "Servertsprofiles" & $ID $oAD_User.TerminalServicesHomeDirectory = "Servertshome" & $ID $oAD_User.TerminalServicesHomeDrive = "Z:" $oAD_User.AllowLogon = True $oAD_User.SetInfo() If @error <> 0 Then Return SetError(@error, 0, 0) Return 1 EndFunc ;==>_AD_SetTSProfile ----------------------------------------------------------------------------------------- i ran this small script for the purpose of troubleshooting #Include <AD.au3> #Include <lauze.au3> $sAD_User = "TestUser" _AD_Open("","","DC=XXX,DC=XXX","Server.XXX.XXX","CN=Configuration,DC=XXX,DC=XXX") $result = _AD_SetTSProfile($sAD_User) ConsoleWrite(" " & $result & " - " & @error & " - ") _AD_Close() ---------------------------------------------------------- results: >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "P:DocumentsAuto Ittestts_win7.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop 0 - -2147352570 - +>14:02:37 AutoIt3.exe ended.rc:0 >Exit code: 0 Time: 0.820
-
ERROR: undefined macro. If @OSArch =
paullauze replied to paullauze's topic in AutoIt General Help and Support
and there were some .au3 's missing from the include folder. that should have been a clue! -
ERROR: undefined macro. If @OSArch =
paullauze replied to paullauze's topic in AutoIt General Help and Support
thanks, i just assumed that beacuse i downloaded a fresh copy of Autoit that it was the most recent. i must have grabbed the wrong one. -
ERROR: undefined macro. If @OSArch =
paullauze replied to paullauze's topic in AutoIt General Help and Support
SciTE Version 2.28 AutoIt v3.2.10.0, which dont seem right but that is what it says in the Help. -
i just got a new windows 7 64 bit machine at work. I get a error when complilling with #include <AD.au3> excerpt from console: xxxAuto ItIncludeAD.au3(423,15) : ERROR: undefined macro. If @OSArch = ~~~~~~~~~~~^ xxxAuto ItIncludeAD.au3(423,35) : ERROR: undefined macro. If @OSArch = "IA64" Or @OSArch = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ xxxAuto ItIncludeAD.au3(1290,66) : ERROR: _ArrayToString() called with wrong number of args. $aAD_Objects[$iCount2][$iCount1 - 1] = _ArrayToString($aTemp) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\Array.au3(808,87) : REF: definition of _ArrayToString(). Func _ArrayToString(Const ByRef $avArray, $sDelim, $iStart = Default, $iEnd = Default) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ xxxAuto ItIncludeAD.au3(1306,51) : ERROR: _ArrayToString() called with wrong number of args. $aAD_Objects[$iCount2] = _ArrayToString($aTemp) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ even if all i am compiling is th eincludes #include <Word.au3> #include <Excel.au3> #include <AD.au3> it has always worked fine XP, so this must have something to do with window 7 or being 64 bit.
-
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
thanks for that bit of info, it was definately pointing in the right direction. i was able to paste a piece of sample code into an Excel macros and to my surprise - it worked for the most part. i have a few things to work out like i need to connect to z: intead of the local server but that has been a huge help. maybe i can work that into the AD UDF thanks -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
the _AD_GetObjectProperties() dont show Terminal Services properties. it will show just about everything else i need but not the Terminal Service Info. $aProperties = _AD_GetObjectProperties($testuser) _ArrayDisplay($aProperties, "Active Directory Functions Properties for user '" & $testUser & "'") maybe i just dont understand how Terminal Services propeties are stored. maybe it is not part of the normal AD Properties. if i could get/add/modify Terminal Services paths using the AD UDF it would be happy, happy, happy. -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
yes. your solution did solve my problem -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
I GOT IT!!!!!!!!!!!!!!!!!!!!!! i had replace the wrong line (duh) thanks for your help. -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
"CN=LastName, FirstName X - TestUser". i was sure that was going to do it too. -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
funny, it is still coming back "fixed" without the escape. i wonder if it is getting fixed some else before it gets to this function. i will look at it more in a bit. -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
your right , the escape is missing LastName, FirstName X - TestUser -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
anyone got any ideas for settingn the Terminal Services Profile information in AD using AutoIt? i have been racking my brain for months on this one. -
Active Directory UDF - Help & Support
paullauze replied to water's topic in AutoIt General Help and Support
back to the _ADMoveObject issue..... do you think the problem may be relate to the need for a path with spaces to be enclosed in quotes?? putting quotes in a string can be a bit tricky example from something else i was working on: $moveString =" /c dsmove """ & $sObject & """ -newparent """ & $mirrorContainer & """"