andyvl
Active Members-
Posts
30 -
Joined
-
Last visited
andyvl's Achievements
Seeker (1/7)
0
Reputation
-
I managed to create a working client/server environement. (in programming, tcp) But now I want my uptime to be good. There are 2 ways that my server can shut down. or the application crashes, or I ask it to. In the first case, I want my server to restart itself. in the second it can stay off. The total environement exists out of 4 processes. (only one can be manual shutdown) but the 4 of them need eachother. So I created a 5th process that is constan checking if the 4 are still running. but now I can't shut it down manually ofcourse. So is there a way to fix this and how?
-
I was playing around with a inputbox. Putting all kind of input, and all was well. Until I presed the cancel butoon. A whole bunch of my files were suddenly gone and a strange yoya (strange written) came in place. I immediatly shut down my complete internetconnection affraid of somebody breaked through my firewall. I tried it again, same result. Luckely for me I take backups of my progress to my USB stick about once every hour So I didn't loose that much data. How can this happen? it was just something like $var = inputbox("input", "put something in") if isbin($var) then operations endif
-
I based myself on this script. looking for this values and if present delete them. but I still have the options available (and both file and printer sharing and client for microsoft ) need to be turned off (prefered that this is done on ALL nics) but really don't know how to handle this
-
hmm thanks. But it seems that the script is not working. (finally was able to test the original also, and it's not working either. Any other way to do this?
-
To be honnest, I don't know. I'm cleaning out/trying to improve a network from a friend. A lot of it is done, except for 2 things. On of them is the need for a script to easily turns on and off file and printersharing and client for microsoft on a computer. (this will be implemented in the startupscript) Reason for the need, is that during certain period, the users are not allowed to use the supported options. I'm looking now for over 2 days and I almost only find manual sollutions. But it is not an option to go to about 100 pc's and change the value manual. so this needs to be automated. so any help is appreciated.
-
I'm new to autoIt How can I convert a script to autoIt? let's say I have bellow script ;Enable "File and Printer Sharing for Microsoft Networks" functionality Shell '%comspec% /c @lanroot\nbtstat.exe -a %computername%|find /i "<20>"' If @ERROR<>0 Shell '%comspec% /c echo' $index=-1 While @ERROR=0 $index=$index+1 $nickey=EnumKey('hklm\software\microsoft\windows nt\currentversion\networkcards',$index) $nicid=ReadValue('hklm\software\microsoft\windows nt\currentversion\networkcards\'+$nickey,'servicename') If @error=0 $lanmanserverkey='bind','export','route' For Each $i In $lanmanserverkey $lanmanserverkeyi=ReadValue('hklm\system\currentcontrolset\services\lanmanserver\linkage',$i) If InStr($lanmanserverkeyi,$nicid)=0 Select Case $i='bind' WriteValue('hklm\system\currentcontrolset\services\lanmanserver\linkage',$i,$lanmanserverkeyi+'\Device\NetBT_Tcpip_'+$nicid+'|','reg_multi_sz') Case $i='export' WriteValue('hklm\system\currentcontrolset\services\lanmanserver\linkage',$i,$lanmanserverkeyi+'\Device\LanmanServer_NetBT_Tcpip_'+$nicid+'|','reg_multi_sz') Case $i='route' WriteValue('hklm\system\currentcontrolset\services\lanmanserver\linkage',$i,$lanmanserverkeyi+'"NetBT" "Tcpip" "'+$nicid+'"|','reg_multi_sz') EndSelect EndIf Next EndIf Loop EndIf how can I alter it to autoit? what neet to be changed? (of somebody can translate this, I have a good reference cause I have a lot of 'registry-altering' scripts that need to be converted.
-
please help. If I get this to work, I can do the rest of my project. But this is the foundation and I'm stuck.
-
hmm, my buffer seems to be the problem. but I don't know how to fix this. When I put checks (valueoutputs) on this part of the code $n = FileGetSize($file) $buffer = StringTrimLeft($file,StringInStr($file,"\",0,-1)) & "," & $n & "," & FileRead($file) While StringLen($buffer) $x = TCPSend($socket,$buffer) If @error Then ExitLoop $n -= $x $buffer = StringTrimLeft($buffer,$x) I got for $n a value of 3072054 when I check the size of my buffer before I go into the loop it's 60 x send more then 60 bytes so I am almost after first run through the loop. What's wrong?
-
OK. bellow some code I found. and this is doing exactly what I need... almost I am on the road alot. So I often don't have a network connection available. So I need to be able to test this local also (so both client as server need to run often on same pc during the development of the project ) When I send a smile file (ini), it sends and receives great. When I send a larger file (a bmp of 3MB) it doesn't work. I got a msg that I am sending (and receiving), but after 5 bytes it hangs. I admit I'm not fully into the sockethandling. So I was wondering if somebody can help me out to help me adjust the above code with a few (I think small) adjustments. So first of all, why does a small ini file 3kb work excellen. and a bmp is stuck after the 5 first bytes. (is this cause the way it is send? images maybe need to be send binary) seconf of all, I noticed when I send a ini file twice, he just put the new part under the old one. Since in the environement, the same filename only means changes, the file can be overwritten without being asked. So can somebody please help me out on this changes. (and if possible, please explain the meaning of the changes so I understand and learn)
-
OK, a transfer over data over LAN now. A computer is keeping a log (encrypted ini file) and screenshots locally. But at a randomly period (aprox. every minute) these files need to be send to a location on the LAN (to a place were the user itself doesn't have access to. so I need to pass along a username and password) I found this bellow code and is is certainly helpfull for the screenshots. But what do i need to adjust for the authenication? and what is the best way to do this for the ini? ** edit code was not working. found better code bellow. please see bellow post for the question
-
hmm, is not working. I did the script first showed current computername change computername to another showed new computerame. (but it's still the same) also after a gpforce /update the name hasn't changed. And yes it is indeed needed for a project that the computername changes to the name of the user logged on to it. (registry value also didn't seemed to work) and it need to be done without installing extra components in windows. thx for your support and help so far, but it wasn't correct. Please any other idea or suggestion
-
Is there a quick way to change a computername with autoIt script? (I need to have the computername equal as the loged on user. so something like @computername = $userid (pay attention that I use the userid as written in the registry, cause my script runs as a service, otherwise I have 'system' as user.
-
finding ip address when computer name is known
andyvl replied to sumit's topic in AutoIt General Help and Support
this is indeed easier then mine -
finding ip address when computer name is known
andyvl replied to sumit's topic in AutoIt General Help and Support
ping it (you can use doscommands) then investigate the output func _ping($computername) local $result $ping_PID = runwait(@comspec & " /c ping " &computername, '', @sw_hide, 2) while 1 $pingresult = stdoutread($ping) if @error then exitloop return -1 endif if $pingresult then $result $=$pingresult else sleep(10) endif wend return $result endfunc then it's just stringmanipulation on the returnvalue -
if last action is done to fast, maybe you can use the sleep option? sleep(5000) it's in millisec so now you wait 5 secs