Not sure what I'm doing!

BatchPatch Forums Home Forums BatchPatch Support Forum Not sure what I'm doing!

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8946
    Kevin Hyland
    Participant

    Hi

    I’m trying to re-organise the sequence of Adapters and Binding on multiple Window 7 computers on a domain. I’m using the following in a simple batch file

    nvspbind /++ “Wireless Network Connection” ms_tcpip

    nvspbind /++ “Local Area Connection 4” ms_tcpip

    nvspbind /++ “Local Area Connection 3” ms_tcpip

    nvspbind /++ “Local Area Connection 2” ms_tcpip

    nvspbind /++ “Local Area Connection” ms_tcpip

    Which basically puts the Wireless Connection bottom of the pecking order with the LAN connections at the top

    So this works fine on my local PC. So I modified it for updating of Remote PCs

    @echo off

    set uber=%1

    psexec -nobanner -accepteula \%uber% -c nvspbind /++ “Wireless Network Connection” ms_tcpip >nul

    psexec -nobanner -accepteula \%uber% -c nvspbind /++ “Local Area Connection 4” ms_tcpip >nul

    psexec -nobanner -accepteula \%uber% -c nvspbind /++ “Local Area Connection 3” ms_tcpip >nul

    psexec -nobanner -accepteula \%uber% -c nvspbind /++ “Local Area Connection 2” ms_tcpip >nul

    psexec -nobanner -accepteula \%uber% -c nvspbind /++ “Local Area Connection” ms_tcpip >nul

    psexec -nobanner -accepteula \%uber% -c nvspbind /o ms_tcpip

    Yep – I know it’s not tidy, but need to check this works first!

    And if I ran the Batch file with the remote computer name (ie ReOrderBind <computername>) then the Adapters were re-ordered on the remote computer. It works fine but no matter how I try I cannot get the same principle to work in BatchPatch. It says Success or Exit Code 0, no errors but doesn’t do anything to change the order of the adapters. If I manually run the Batch from CMD it runs and updates the Binding

    I’ve two scripts, one with PSEXEC in the batch and the other as if I was running it locally on the remote PC. Never gets any errors from BP, tells me Success but doesn’t do anything.

    Any assistance appreciated

    Thanks

    Kevin

    #10423
    doug
    Moderator

    I created a batch file ‘nvspbind.cmd’ with the exact contents that you posted, only modified for my target computer’s network connections, which does not include a wireless connection. On my target computer I used the GUI to set my the binding order out of sequence (1,3,2,4).

    Contents of my ‘nvspbind.cmd’:

    nvspbind /++ "Local Area Connection 4" ms_tcpip
    nvspbind /++ "Local Area Connection 3" ms_tcpip
    nvspbind /++ "Local Area Connection 2" ms_tcpip
    nvspbind /++ "Local Area Connection" ms_tcpip

    I then put a copy of nvspbind.exe in C:Windows on the target computer.

    I then executed a BatchPatch deployment (using the same method as described here, but instead of deploying a .MSU I deployed the .cmd remotely-deploy-a-standalone-msu-update-to-multiple-computers ) to deploy nvspbind.cmd to the target computer. It ran successfully with Exit Code 0. I then verified in the GUI on the target computer that the bindings had been re-ordered successfully.

    Another option that also works is if you don’t want to put a copy of nvspbind.exe on the target computers, instead you can put it in the same directory as your nvspbind.cmd file with just those two files (nvspbind.cmd and nvspbind.exe) in that directory. Then in your deployment settings you’ll still deploy the .cmd file, but then you’ll also tick the box that says ‘Copy entire directory…’ so that both the .cmd and the .exe get copied to the target. Then the batch file is executed, and the files are removed from the target after completion.

    All that said, I don’t see any reason why you should not be able to do exactly what I just did.

    -Doug

    #10426
    Kevin Hyland
    Participant

    Thanks Doug

    I didn’t try running the script as a software deployment – I was trying to run it locally or remotely as it’s a script.

    Silly me!

    Thanks again for the great support Doug

    Cheers

    Kevin

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.