Sign in to follow this  
Followers 0
rfgrau

Issue: Editing Control Panel as System Account in Startup Script

1 post in this topic

Hello, Everyone, I've got a fairly specific problem that I'm trying to use AutoIT to solve. It seems like I'm almost there, but it isn't quite working.

Here is the issue, in our environment, we have an AFS client installed on our windows computer. When the AFS client is installed the Microsoft Loopback adapter is also installed.

When we upgraded to XP SP3, our remote assistance stopped working because (for whatever reason) the Loopback Adapter is the first device that each computer binds to in the Network Settings, and Remote Assistance just connects to the first bound adapter.

In order to change the binding order of the devices, you have to go to the Advanced Settings menu of Network Connections control panel window. There you can order of the adapters. Interestingly, this is not something that you can through VBscript. The only way to correct the settings is either by hand or something like AutoIT.

I created a script that seems to work like I want. It is below:

Dim $ItemNum
Run("control.exe ncpa.cpl")
WinWaitActive("Network Connections")
Send("!n")
Send("s")
WinWaitActive("Advanced Settings")
$ItemNum = ControlListView("Advanced Settings", "", 25000, "FindItem", "Local Area Connection 2")
If ($ItemNum >= 0) Then
    ControlListView("Advanced Settings", "", 25000, "Select", $ItemNum)
    ControlClick("Advanced Settings", "", 25002)
EndIf
ControlClick("Advanced Settings", "", 1)
WinWaitActive("Network Connections")
Send("!f")
Send("c")

This works fine when I am logged in and running it with administrative rights. The trouble is that our users work in a restricted rights environment, and when I try to run this as a startup script in Group Policy, I get some strange results.

What happens when the startup script is running is that you see the System Account desktop appear, followed by the message:

Windows cannot find '/idlist,:308:908' Make sure you typed it correctly, then try again.

The numbers in the message are variable.

I've looked at the Internet suggestions for "Windows cannot find /idist yada, yada, yada" and the suggestions are all over the place. [Also, none of them were particularly helpful] I'm hoping there's something else that I'm doing incorrectly before I get to the point that I have to solve /idlist issues.

Any suggestions?

Rob

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0