Hi there,
I recently developed a script for my workplace that will create users in SAP based on a pre-filled excel sheet. I work on a locked down machine (can't even change my screen resolution...), and very likely to also be a locked down user.
The "user creation" part of the script works just as it should : all the data is picked up, fed into SAP (credits to the SAP UDF available on this forum), users are created, and my "report" files come out in .txt in the MyDocs folder just as I wanted to.
My problem comes into play with the latest addition I made to the script, a UDF I found on this forum that allows you to send an email by using the "CDO.Message" method. The function is _INetSmtpMailCom - I applied it so I could automatically send a report whenever this script was used and/or went into error. Basically, I wanted a way to monitor the script usage from outside.
On my own machine, everything works as a charm, but on the locked down machine, even though it IS connected to the internet, the _INetSmtpMailCom function returns the error that points towards "no internet access".
At first, I thought it could be some block on the Gmail SMTP port, or something like that... so I looked for simpler ways to "check internet state" through the following scripts (that I also found on the forum).
; #FUNCTION# ==================================================================================================================== ; Name ..........: _CheckConnection ; Description ...: Will tell if your internet down, or just DNS ; Syntax ........: _CheckConnection() ; Parameters ....: ; Return values .: 0, 1, 2 INT ; 0 = Everything fine, internet/DNS up. ; 1 = DNS is down, but IP ping worked. ; 2 = Internet is down entirely. ; Author ........: BinaryBrother ; =============================================================================================================================== Func _CheckConnection() Local $PingDNS1, $PingDNS2, $PingDNS3, $PingDNS4, $Ret TCPStartup() $PingDNS1 = Ping("google.com") $PingDNS2 = Ping("computerhope.com") $PingDNS3 = Ping("yahoo.com") $PingDNS4 = Ping("download.com") If $PingDNS1 <= 1 And $PingDNS2 <= 1 And $PingDNS3 <= 1 And $PingDNS4 <= 1 Then $Ret = 1 ;DNS is possibly down, check internet next. $PingDNS1 = Ping("74.125.93.106") $PingDNS2 = Ping("69.72.169.241") $PingDNS3 = Ping("67.195.160.76") $PingDNS4 = Ping("64.30.224.118") If $PingDNS1 <= 1 And $PingDNS2 <= 1 And $PingDNS3 <= 1 And $PingDNS4 <= 1 Then $Ret = 2 ;Internet Down EndIf Return $Ret Else Return 0 ;DNS and Internet are up EndIf EndFunc ;==>_CheckConnection $Ret1 = _CheckConnection() MsgBox(0, "", $Ret1)
Now, I know these scripts work just fine because on my own machine the results are correct: If I switch my internet off, I get the "right" errors and if I switch it back on I do get the positive confirmations I should be getting.
When I run these on the locked down machine, I can't even ping Google or any of the other sites that the third UDF uses. I am pretty sure that the problem is that I'm running this on a locked down machine AND as a locked down user.
I'm NOT asking for a script to unlock the machine. I would just like to know if this is the sort of issue that could be "easily" solved by being a local admin on the machine or if it's a lost cause in a major corporate network environment... furthermore, I would like to understand what is the exact reason behind it. Is it purely the fact that I'm on a locked down machine ? Is it because some particular policy is applied ? (I mean, I suppose that if the user can't start the command prompt, he's not allowed to use any of those related commands...)
I will probably ask to be a local admin just for the sake of making the test and find out by myself but again, I would like to understand where the block is and what it is.
Thanks in advance.