Old 11-24-2010, 07:01 AM   #11 (permalink)
Untangler
 
Join Date: Nov 2010
Posts: 65
techuser is on a distinguished road
Default

So I changed the code to echo more information....

Code:
'Handle or Ignore all errors
Dim objWMI: Set objWMI = GetObject("winmgmts://./root/cimv2")
Set colProcess = objWMI.ExecQuery ("Select * from Win32_Process Where Name='cscript.exe'")
WScript.sleep(2000)
On Error Resume Next

'Time in milliseconds to sleep between request 60000=1min
SLEEP_PERIOD = 60000

URL_PREFIX = "http"

If WScript.Arguments.Count = 1 Then
	ServerName = WScript.Arguments.Item(0)
Else
	ServerName = "firewall.company.com"
End If
WScript.Echo WScript.Arguments.Count
WScript.Echo "ServerName is:"
WScript.Echo ServerName
When the program runs, this is what it is returning
1
Server Name : <THIS IS TOTALLY BLANK>
ad_logon_user.vbs

(1) So for some reason, when the program is executed via a Logon Group Policy it is setting the WScript.Argument.Count to 1 which, dumps blank data into the ServerName variable??

(2) I thought Hard Coding the path would fix the issue, but unfortunately, if I continuously hit refresh on the Directory Connector screen, I will see some IP's switch to workstation name and then quickly back to the login name???, so it's still not working 100%.
techuser is offline  
Old 11-24-2010, 12:34 PM   #12 (permalink)
Master Untangler
 
Join Date: Aug 2008
URLs submitted: 2
Posts: 442
Danp is on a distinguished road
Default

For #1, I think you are looking at it incorrectly. It output exactly what you told it to.

On #2, can you post a screen shot showing an example of what you are seeing?
Danp is online now  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 04:39 AM.


© 2010 Untangle, Inc. All Rights Reserved.   SEO by vBSEO 3.6.0 PL2