
Erlend
Active Members-
Posts
43 -
Joined
-
Last visited
Erlend's Achievements

Seeker (1/7)
0
Reputation
-
thanks, i had forgot about that...
-
This will give the error: Line-1: Error: Variable must be of type "Object".
-
Hello #include <AD.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("TrayIconHide", 1) $getMailNotes = _AD_GetObjectAttribute(@UserName, "notes") MsgBox(64, "test", "user information is missing") If $getmailNotes = 0 Then Run("..\app1.exe") EndIf how can i get a if statement over to run app1.exe when $getmailnotes returns a blank value. Thanks.
-
Active Directory UDF - Help & Support
Erlend replied to water's topic in AutoIt General Help and Support
Can it be used like this? do i have to specify $SDNSDomain, $SHostServer, $SConfiguration? $SUserid =("user1") $SPassword=("password1") _AD_Open($SUserId, $SPassword,) ;rest of application under: Thanks -
Hello, is it possible to specify a username and password when connecting to AD? can AdOpen be used with, $sAD_UserIdParam and $sAD_PasswordParam? but what is the correct way to use them? Thanks for any help
-
Thanks i will trie this, for now i have managed to resolve it by making a query by username, when the information is collected.
-
Hello i have created a small application that collects varius information in a txt file, the txt file looks like this: user input inn the application is username, and the information i need to get out is the data from SessionName and ServerName so if i input User2 in my application i need to return data about SessionName and ServerName, i have looked at using FIND to return the line number and the use filereadlin to read this line + 1 and + 3 but i haven´t got it to work yet the data that FIND returns if i use this is: [11]UserName : User2 so if i could get filereadline to read a line number based on that FIND returns the problem is solved. name : 57a8:3:APP1 host : SERVER1 zone : 192.168.1.0 Version[Session] : 1 ProductType : 12 SessionId : 3 ClientName : WI_HDYctb6leGHTXIFAL UserName : User1 SessionName : ICA-tcp#107 LogonTime : 0000-0124-fe040e07 ServerName : SERVER1 AppName : APP1 SessionConnectionType : 1 ClientNameIndex : WI_HDYctb6leGHTXIFAL DomainUserNameIndex : DomainX\User1 HostId : 22440 UserDomain : DomainX Protocols : 1 DataType : 1 ServerType : 1 ClientType : 1 LaunchedBrowserName : APP1 InitialBrowserName : APP1 SessionState : 0 FullyQualifiedCredentials : DomainX\User1 SessionAuthenticationType : NT 00080022 : 0 AccessSessionGuid : IsLastSessionApp : 1 DeviceId : LogonString : DomainX\User1 UPN : \User1@DomainX.LOCAL ADSDomain : \User1@DomainX.LOCAL name : 2553:1:APP1 host : SERVER2 zone : 192.168.1.0 Version[Session] : 1 ProductType : 12 SessionId : 1 ClientName : WI_ERnNBwRAfAsLlnd7O UserName : User2 SessionName : ICA-tcp#36 LogonTime : 0000-0124-fe03f58d ServerName : SERVER2 AppName : APP1 SessionConnectionType : 1 ClientNameIndex : WI_ERnNBwRAfAsLlnd7O DomainUserNameIndex : DomainX\User2 HostId : 9555 UserDomain : DomainX Protocols : 1 DataType : 1 ServerType : 1 ClientType : 1 LaunchedBrowserName : APP1 InitialBrowserName : APP1 SessionState : 0 FullyQualifiedCredentials : DomainX\User2 SessionAuthenticationType : NT 00080022 : 0 AccessSessionGuid : IsLastSessionApp : 1 DeviceId : 00080027 : DomainX\User2 LogonString : DomainX\User2 UPN : \User2@DomainX.LOCAL ADSDomain : \User2@DomainX.LOCAL Thanks for any help
-
Hello i have a small script, the part under is a part of it, how can i create a error handler for det "fileredline" sp that if the file dosn't contain any data the script should exit with a message box. When the txt file dosn't contain any data as the script is now, i get this error message: error message picture $file1 = fileopen("u:\server.txt", 0 ) $stringarray1 = StringSplit( filereadline( $file1, 3), ":" ) ;more code under here.....
-
Thank's worked grat
-
thanks agian, i have now tried diferent combination, but i cant figure out when to start the RunWait command and when to creat the GUI: $hGUI = GUICreate("server - collecting information", 420, 40) GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE RunWait(@COMSPEC &" /C " & $TSTool & " " & $user & " > u:\user.txt", @HomeDrive, @SW_HIDE) Exit EndSwitch WEnd where hould i put the RunWait command?
-
Thanks for a very fast reply , should i just add the external command before creating the stand alone GUI?, i have looked at this as an solution, but i have'n tryed it.
-
Hello, i have created i samll app that runs an external command to collect data from 100+ servers, my problem with the progres bare is that the external command uses a diferent amount of time etatch time, part of the code: ProgressOn("APPx1", "collecting server info...", "99 percent") For $i = 95 to 100 step 99 sleep(1000) ProgressSet( $i, $i & " percent") RunWait(@COMSPEC &" /C " & $TSTool & " " & $user & " > z:\user.txt", @HomeDrive, @SW_HIDE) Next ProgressSet(100 , "Completed", "server info collected") sleep(500) ProgressOff() as you can se the external command tuns in the midle of the progress bar, i have now set it to start at 95% if it,s any help i can use a ProcessWaitClose to check if the external comand is completed. How can i make the progres bare just run as long as the external command takes to complete, and the go to 100%? Thanks for any help
-
hello i have to txt files contaning the following lines: txt 1 ---------- U:\USER.TXT TS WinStation Name: ICA-tcp#11 txt 2 ---------- U:\USER.TXT Server Location: TESTSERVER whats the simplest way to extract the content after : excample TESTSERVER thanks for any help
-
RunASWait With variable from ini file
Erlend replied to Erlend's topic in AutoIt General Help and Support
solved: Opt("TrayIconHide", 1) Dim $appdir $appdir = IniRead("s:\vismakiller\config.ini", "SERVERS", "appdir", "NotFound") If Not IsAdmin() Then RunAsWait('user_', "domain_", 'password_', 0, @ComSpec & " /c " & '"' & $appdir & '"', "", @SW_HIDE) EndIf -
RunASWait With variable from ini file
Erlend replied to Erlend's topic in AutoIt General Help and Support
solved: Opt("TrayIconHide", 1) Dim $appdir $appdir = IniRead("s:\vismakiller\config.ini", "SERVERS", "appdir", "NotFound") If Not IsAdmin() Then RunAsWait('user_', "domain_", 'password_', 0, @ComSpec & " /c " & '"' & $appdir & '"', "", @SW_HIDE) EndIf