Script to Change WINS IP based on current address.

Hello everyone! I've been looking online for help on changing the primary and secondary WINS addresses on hundreds of servers. I've come across scripts that will set the WINS addresses for all enabled NICS on servers listed in a .txt file. But I don't want
it to set WINS address on adapters on our backup network. Long story short, here's what i need:
PowerShell script that will:
1. Change the Primary and Secondary WINS addresses on servers from a .txt (or .xlsx) file. 
2. Makes the change by querying the enabled adapters on the server that already have a specific IP address defined for WINS.
Here is an example of what I need (I don't know who the original author of this is to give proper credit.) It does what I want for DNS, but need it modified for WINS only. I really appreciate anyone's suggestions!
#------------begin script-----------------------------
$ScriptPath        = Split-Path $MyInvocation.MyCommand.Path 
$oldDNS         = "Enter IP Address Here"        # Old DNS you want replaced
$newDNS         = "Enter IP Address Here"        # New DNS server you want
$List             = $ScriptPath + "\list_server.txt"        
$log             = New-Item -ItemType file -Path $ScriptPath -name change_DNS.csv -Force        
Add-Content -Path $log -Value "Servers;Status"
[array]$List = get-content $List 
for($i=0; $i -lt $List.Length; $i++) 
    $Server =$List[$i]
    Write-Progress -Activity "Modifying DNS records" -Status "Server: $Server"
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $ping.send($Server)
    if ($Reply.status –eq “Success”)
        $colItems = get-wmiobject -class "Win32_NetworkAdapterConfiguration" -namespace "root\cimv2" -computername $Server | Where-Object {$_.IPEnabled -eq "True"}
            foreach ($objItem in $colItems)
                 $strDNSServerSearchOrder = $objItem.DNSServerSearchOrder
                 $dnsexists = $strDNSServerSearchOrder -Contains $oldDNS
                 if ($dnsexists -eq "True")
                    $newArrDNS = $strDNSServerSearchOrder -replace ($oldDNS,$newDNS)
                    $objItem.setDNSServerSearchOrder($newArrDNS) | out-null
                    Add-Content -Path $log -Value "$($Server);A replacement has been made"
                else {Add-Content -Path $log -Value "$($Server);No Replacement criteria found"}
    else {Add-Content -Path $log -Value "$($Server);Offline or no ping"}
    $Reply = ""
#------------End script--------------------------

Yes Bill I did, but didn't find exactly what I was looking for. Oddly enough though, I started searching by "PowerShell Get WINS servers" and I came across something that helped. I ended up using this:
# here is where I read from the list of servers, this makes the entire list a variable
$servers = Get-Content C:\Scripts\PS-Scripts\WINS\Test.txt
Get-wmiObject Win32_networkadapterconfiguration -computername $servers -Filter 'IPEnabled=TRUE and DHCPEnabled=FALSE' | # This filter will make sure the NIC is enabled and DHCP is disabled
ForEach-Object{ # here is where the list goes through individual objects (or servers)
IF($_.WINSPrimaryServer -ne $null)
{ # My list shouldn't include any servers with the Primary WINS server set but as a fail-safe this IF statement will catch it if it set
$_.SetWINSServer("123.123.123.123","123.123.123.123") # If a server has meets all the requirements Here is where I change set the New WINS server address
From Networksteve.com. It looks like JRV may have originally contributed to the answer on that site, so i'll give him the credit for answering. Thanks both of you for your help!

Similar Messages

  • Tcl script to change access vlan based on MAC address

    Hello all.  I'm looking for some input on how best to handle this situation. I have a large nework with a lot of remote offices where we have limited control over users moving around patch cables. We're using vlan-based QoS in these office to mark voice, video, data. etc. The problem I'm having is that our users are moving video conferencing equipment to different interfaces on our swithes, which puts the VTC unit in a different vlan, fouling our QoS policy.  They then call and complain about poor video quality.
    I'm trying to come up with a way to automate putting the interface in the video vlan if a VTC unit is connected. All of our video conferencing units are from the same vendor, so they have same OUI in the MAC address. The script I've been working on looks for a line protocol up event, then checks to see what access vlan is configured on the interface. If the interface is already in the video vlan, the script exits.  if the interface is not in the video vlan, the script looks at the MAC address table for the interface and if the OUI matches a VTC unit, the script changes interface configuration. My question is, is there a better event to trigger script execution? Maybe a MAC notification trap, or something else? Line protocol transitions when the access vlan is changed, so the current script runs twice: once when the interface first comes up with a new connection, and again when the vlan is changed. 
    Script is attached.  Any help or advice is appreciated!

    Does your video equipment use CDP?  If so, then you can use the neighbor-discovery event detector to only react when you see a media endpoint being connected to a port.  Yes, MAC address notifications (the mat ED) can also work if you know the MACs of your media endpoints.

  • Script for changing objects presence based on amount range

    Hello,
    Is there a way to change an objects presence (either a field or a subhead) based on the entered amount range in a numeric field? 
    For example:
    -The numeric field amount entered is a range between 1 and 49,999, then "Signature Subhead 1" appears.
    -The numeric field amount entered is a range between 50,000 and 250,000, then "Signature Subhead 2" appears.
    Etc.
    Any advice for this script would be appreciated.
    Thanks!

    Hi Bruce,
    Your solution worked perfectly.  If I was to expand the ranges (let's say to three ranges), would I just have to add another "case this" logic section such as this?
    switch (true)  
    case this.rawValue >= 1 && this.rawValue <= 49999:  
      SignatureSubhead1.presence = "visible";  
      SignatureSubhead2.presence = "hidden";
      SignatureSubhead3.presence = "hidden"; 
      break;  
    case this.rawValue >= 50000 && this.rawValue <= 249999:  
      SignatureSubhead1.presence = "hidden";  
      SignatureSubhead2.presence = "visible";
      SignatureSubhead3.presence = "hidden";    
      break;
    case this.rawValue >= 250000 && this.rawValue <= 500000:    
      SignatureSubhead1.presence = "hidden";  
      SignatureSubhead2.presence = "hidden";
      SignatureSubhead3.presence = "visible";    
      break;  
    default:  
      SignatureSubhead1.presence = "hidden";  
      SignatureSubhead2.presence = "hidden";
      SignatureSubhead3.presence = "hidden";   
    Appreciated,
    Eric

  • Is there a script to change paragraph style based on even/odd page

    Is there a script or way to have paragraph style change between 2 styles based on the text being on an even or odd page? 

    @JustMikey – as I understand your task, the problem has nothing to do with "special" paragraph styles, but (nearly) all with anchored objects (the images and parts of the gray bar) and appropriate margin settings.
    Just see the following IDML file I exported from InDesign CS5.5:
    Dropbox - ImagesAwayFromSpine-CS5.5.zip
    ImagesAwayFromSpine-CS5.5.zip
         ImagesAwayFromSpine-CS5.5.idml
         080731_Manchester-xxl_Grau.tif
    Of course you could add paragraph styles to format the data automatically or optimize in other ways.
    That's up to you. But you can see the principle:
    Inspect the Anchored Object Options for the image and the gray bar. Also the frame fitting options for the image.
    Note: See also the margin settings, that are not exactly mirrored on even and odd pages (for good reason).
    Uwe

  • Script to change fill color based on excel data?

    Hi.  I'm curious if there is a way to change the fill color of, say a rectangle, in Illustrator based on data in an excel spreadsheet (csv or whatever).  For example: say the data in the excel cell is 1 and that corresponds to the rectangle in Illustrator having a yellow fill...  Now say I update the data in the cell to 2 and save.  I run the script and it makes the box red.  Is that even remotely possible?  Thanks.

    Hi, yes it's possible, I used VBA on Windows
    Assuming you have an Illustrator file with 1 square, and 2 swatches named "yellow" and "red"
    this is how I set up the excel file
    type the formula in cell F2 as shown, make your color updates on cell E2
    VBA code:
    Sub recolorSquare()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim rect As Illustrator.PathItem
        Dim whatColor As String
        whatColor = range("F2")
        Set idoc = iapp.ActiveDocument
        Set rect = idoc.PathItems(1)
        rect.FillColor = idoc.Swatches(whatColor).Color
        Set rect = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub

  • Calculation Script to change a number based on quantity in another

    Hello - and thanks for the help - I have no real idea of what I am doing when it comes to writing script.  I would like the cost of something to change depending on the quantity ordered... ie. the more you buy the better price you get.
    (ie.  5 or less = $18.00, 6-10 = $17.00, 11+ = $16.00)
    How do I write a calc script to accomplish this?  Also, if the "Quantity" affecting the outcome is a result of a calculation itself will the code still work?
    I have uploaded a sample to the following:
    http://www.shupaca.com/Calc.html
    Thanks!

    Check the spelling of you field names with in your custom scripts.
    Some overall observations:
    Use the provided formats for fields unless you want to write your own format code,  validation code, or keystrokes code.
    Use the default value option to set default values of fields, so if the form is reset, the default value is restored. You can also access this value in code.
    Use the 'read only' parameter to lock field you do not want users of the form to update.
    Check the JavaScript console for errors. You misspelled the field name.
    Do not use a calculation event when another type of event can perform the same script,. Calculation order can become a problem. All field calculations are rerun when ever any field that is used in a calculation is updated, so by the end of your form you may have a significant amount recalculation of unnecessary calculations being performed.
    Setting the 'Scarf Cost' field to read only, default value of 18, and a 'Number' format with 2 decimal places and the "$" currency symbol and removing all scripts for this field, one could use the following "On Blur' action for the 'Scarf Quantity' field:
    var oPrice = this.getField('Scarf Cost');
    oPrice.value = oPrice.defaultValue;
    if (event.value > 5) {
    oPrice.value = 16;

  • Is it possible to script language change in OSX Lion ?

    I recently purchased a Disney game (Cars 2) from the App Store, which advertises being available in 5 languages. It seems now that the game has no in-app options to change language, but selects the language based on OSX settings (but otherwise the app doesn't use ANY of the GUI elements from the OS).
    My Mac's are all set up in English, in the account on which my kid plays the game doesn't have administrator rights (for good reasons). He doesn't master the English language enough and would like to play the game in dutch. On the other hand, when using Safari and other apps, he is used to the English user interface.
    Is it possible to create a script that changes the Finder language to Dutch, then forces Finder Quit, then launches the App, and after quitting the App reverses the Finder Change ? (or if not in one step, maybe in a number of subscripts), so that I can let my kid enjoy his game in dutch without me having to be present each time to change the system settings ?
    Thanks in advance.
    Philip

    Tom, thanks, this works perfectly. In older days, I have been a programmer on Mac (long before even the PowerMac days), and back then I would have used ResEdit to do something similar as what you suggested. Since those days are long gone, I was not sure if it was possible to change the resources of an app without extensive coding software, but the trick you just showed me seems to be the current-day equivalent of ResEdit ...
    Anyways, you saved our day ... thanks alot
    Philip

  • Script to Change swatch CMYK values

    Are there any scripts available to change CMYK values of swatches for files in CS3?
    I have hundreds, probably thousands of Illustrator EPS files that use swatches all drawn from a total palette of maybe 50 colours.
    Each colour is named and has a corresponding CMYK value.
    I want to update the CMYK values for all ~50 colours that appears across all these documents. Is there some way I can simply change the CMYK spec of the swatches used by each of these documents by not having to manually open and change the colours etc?
    Even a script would be good that could batch process the files?
    For example:
    File contains a swatch as a named colour like:
    Fire Red spec'd as 0, 96, 99, 0
    I want to automate changing the CMYK values for all files containing Fire Red to, say, 0, 98, 99, 0
    Any ideas? I have searched Google for a couple of days.
    Edit: the flavour here is Illustrator for CS3 - both Win and Mac.

    I understand EXACTLY what you mean as it's the same thing I need to do, and will probably need to do on future occasions.
    Did you get anywhere with this problem?
    I have designed a scheme for a textbook I am illustrating (this is what I do for a living and have been doing so for well over a decade using Illustrator).
    All colours used in every illustration are based on 7 CMYK Global swatches, usually 100% tints but also 50% 75% and others when required.
    Anyway I have done 100 illustrations already based on my template when I realize I'm going to have to darken the green by +10% cyan.
    What I need is a script to change the definition of my global 'green' swatch in every document from 100Y 30C to 100Y 40C.
    Actions won't do it.
    Any suggestions?

  • How can I filter a Sharepoint 2007 libarry list based on current user login?

    Hi all.
    I would like to know how I can filter a SharePoint library list based on current user login.
    Suppose I have created the followings:
    1) A SharePoint form library containing bunch of uploaded InfoPath form data.
    2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
    I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
    I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value
    to that of "TargetUser".
    I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.
    I have googled this subject for hours but I have not found any solution.
    It would be greatly appreciated if anyone can help me to create a functional filtered list.
    FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
    Thank you.
    Jason

    Here's what I usually do in order to accomplish this.  Ultimately you'll need to have 2 different fields.  There's the one you already have, with DOMAIN\username stored in it.  Then you'll need an additional field as a "person" column type. 
    Call it "TargetPerson" or something.
    Create a sharepoint designer workflow that runs each time an item is created or changed.  One action:
    Set FIELD to VALUE.
    The first FIELD is "TargetPerson", the VALUE is your "TargetUser" field. 
    Once this is done, then the person value is stored in the person field.  This is the field that you can filter by "TargetPerson" is equal to [Me]
    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura

  • Script to change colors

    I'd like a Java Script that will allow the user to change character colors in a document using a drop-down menu to select the new color, or a form the user can type the new color into. Has anyone seen anything like this?

    We're setting up a document in which certain elements (folios, drop-caps, etc.) are one color in one month's publication. They change to another color the next month, and so on.
    I'm looking for an efficient way to change all of them.
    My thought was to have a script that would read the colors specified in stylesheets and then allow the user to change the color based on input from a drop-down menu or form.

  • Change Master Page based on Text Content

    Hello,
    I have found a few examples relating to changing Master pages based on Style.
    However, I would like to change all Pages that flag "True" with the query of the "2-1134" to to "Master-C" for example.
    I have 12 master Pages with different strings that I don't mind editing the script to make work.
    The document is close to 1,000 pages.
    I am having trouble merging so many different scripts into something that will work.
    Platform: Indesign CS4 6.0.5 - OS X (Intel)
    Thank you so much for your input, help and guidence.

    This is what layers are for. Open the Layers panel and make at least one more layer. Put the graphic on the lower layer and the footer on the upper layer.

  • Script to change keyboard modifer keys?

    I'm trying to create a login script to use with Workgroup Manager that will allow me to change the keyboard modifer keys on a client machine. I've done a search and found a few scripts but they don't seem to work. For example the following script:
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.keyboard"
    tell application "System Events"
    tell process "System Preferences"
    click button "Modifier Keys…" of tab group 1 of window "Keyboard & Mouse"
    set curOpt to (get value of pop up button 3 of sheet 1 of window "Keyboard & Mouse")
    set curCmd to (get value of pop up button 4 of sheet 1 of window "Keyboard & Mouse")
    tell sheet 1 of window "Keyboard & Mouse"
    tell pop up button 3
    click
    click menu item curCmd
    end tell
    tell pop up button 4
    click
    click menu item curOpt
    end tell
    end tell
    click button "Ok" of sheet 1 of window "Keyboard & Mouse"
    end tell
    end tell
    quit
    end tell
    I am trying to get this to work on OS X 10.6 with no luck. Firstly I have seperate options in System Preferences for Keyboard and Mouse settings (the script above points to window "Keyboard & Mouse") and secondly, even after changing the "Keyboard & Mouse" to just "Keyboard" I get an error message about not being about to locate button "Modifier Keys...".
    All I'm trying to do is change the Modifier Keys so that Crtl key is set to nothing. Could anyone help me out?

    This could work... (tested with 10.6.7)... not very fast...
    another idea could be a defaults write command, but I am not sure which prefs-file you would have to edit.. maybe .GlobalPreferences.plist...
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.keyboard"
    tell application "System Events"
    tell process "System Preferences"
    click button 1 of tab group 1 of window 1
    set curOpt to (get value of pop up button 3 of sheet 1 of window 1)
    set curCmd to (get value of pop up button 4 of sheet 1 of window 1)
    click pop up button 4 of sheet 1 of window 1
    my setbuttonitem(1)
    click pop up button 3 of sheet 1 of window 1
    my setbuttonitem(2)
    click pop up button 2 of sheet 1 of window 1
    my setbuttonitem(3)
    click pop up button 1 of sheet 1 of window 1
    my setbuttonitem(4)
    delay 0.25
    keystroke return
    end tell
    end tell
    quit
    end tell
    on setbuttonitem(valueindex)
    tell application "System Events"
    tell process "System Preferences"
    repeat with i from 1 to 5
    key code 126
    delay 0.25
    end repeat
    repeat with i from 1 to valueindex - 1
    key code 125
    delay 0.25
    end repeat
    keystroke return
    end tell
    end tell
    end setbuttonitem

  • Existing authorization processes are based on current template

    Hi!
      In 8.8 the "Cannot update stage;existing authorization processes are based on current template" message shows up, when we want to change the user for a given approval stage.
      Our partners did it quite frequently in version 2007A, and succeeded to do so, because there were no checks for existing authorization processes. Now there is. And "existing authorization process" in this case means more than pending approvals for that stage. It also covers those processes, that has been approved by this user, but are waiting for other stages, or waiting for the author to create the invoice. This whole procedure takes usually quite a long time, new processes could be initiated during this time, so it's hard to find a moment when there isn't any "existing" processes.
      I suggest you to revert to the former functionality.
      The check for "existing authorization processes" is quite unnecessary: When we want to change an approval stage it has nothing to do with existing processes, we want to make the change for newly created approvals. And it didn't cause any problem in earlier versions either.
    Our partners usually needed to change approvers, when the original one was out of office, so somebody needed to substitute him/her. It's getting more and more critical since christmas is coming soon.
    Regards,
    Gergely Humicskó

    Hi,
    As per SAP note 1660690,
    "When the draft is generated an alert is registered and sent to the Authorizers.  These alerts cannot be retroactively sent to newly added Authorizers"
    This is the reason why system is not accepting update of approval stages.
    Thanks & Regards,
    Nagarajan

  • New to bash scripting; making script to change laptop CPU governor

    I've got an old laptop and I like to be able to change the governor between performance and ondemand depending on whether or not I've got the laptop plugged in. I'd really like to be able to do this from a shortcut on the desktop, so I decided to try making a bash script that used Zenity dialogs to accomplish this.
    I think it turned out pretty much how I'd like, however the error handling on getting the root password authenticated is pretty broken. I'm not sure how exactly I should go about it.. I think that the long timeout that occurs when you enter a wrong password for su is causing problems. Is there a better way of doing this? I don't use sudo, and I'd really prefer to avoid it and stick to using su if at all possible.
    #!/bin/bash
    #This script will supply a Zenity dialog with the option to change the laptop's governor.
    #It will use a Zenity dialog to acquire the root password from user for autorization to change the governor.
    #Set up some variables we will use.
    optionPerformance="FALSE"
    optionOndemand="FALSE"
    #Read the current state of the governor.
    currentGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    #Change the variables we previously set up to reflect current state of governor. This will be used to determine which option is pre-selected in the Zenity dialog we will create.
    if [ $currentGovernor = 'performance' ]
    then optionPerformance="TRUE"
    fi
    if [ $currentGovernor = 'ondemand' ]
    then opitonOndemand="TRUE"
    fi
    #Set up Zenity dialog which allows user to select the governor they want active. The currently active governor will be selected by default.
    #User's input will go to the wantedGovernor variable for future use.
    wantedGovernor=$(zenity --list --text "Select which governor you want to make active:" --radiolist --column "" --column "Options" $optionPerformance "performance" $optionOndemand "ondemand")
    #Check to see if user clicked Cancel button.
    if [ $? = 1 ]
    then exit 0
    fi
    #Did user select the already active profile? If so, simply report that and exit.
    if [ $wantedGovernor = $currentGovernor ]
    then
    newGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    zenity --info --text "Governor is already set to $newGovernor.\n\nNo changes were made."
    exit 0
    fi
    #Now that we know what the user wants, let's do it.
    #We will use cpupower to change the governor. This will require root privileges, so we will use Zenity to get the root password from user and pipe it into su. (Is this the best way?)
    zenity --title "Password for root:" --password | su -c "cpupower frequency-set -g $wantedGovernor"
    #Check to see if user clicked Cancel button.
    if [ ${PIPESTATUS[0]} = 1 ]
    then exit 0
    fi
    #Check to see if user entered incorrect root password.
    if [ ${PIPESTATUS[1]} = 1 ]
    then
    zenity --error --text "Incorrect root password.";
    exit 1
    fi
    #Now that we've made the change, let's check the current state of the governor again so that we can report it to the user and they can verify success.
    newGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    zenity --info --text "Governor is now set to $newGovernor."
    Last edited by gilmoreja (2015-01-26 21:49:19)

    Thanks for the advice, Awebb. I looked into gksu but I didn't like how it offered to save the root password in gnome-keyring. I found an alternative, ktsuss, and decided to go with that instead.
    I'll post the finished script here, for anyone who is ever interested in such a thing:
    #!/bin/bash
    #This script will supply a Zenity dialog with the option to change the laptop's governor.
    #It will use a Zenity dialog to acquire the root password from user for autorization to change the governor.
    #Set up some variables we will use.
    optionPerformance="FALSE"
    optionOndemand="FALSE"
    #Read the current state of the governor.
    currentGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    #Change the variables we previously set up to reflect current state of governor. This will be used to determine which option is pre-selected in the Zenity dialog we will create.
    if [ $currentGovernor = 'performance' ]
    then
    optionPerformance="TRUE"
    fi
    if [ $currentGovernor = 'ondemand' ]
    then optionOndemand="TRUE"
    fi
    #Set up Zenity dialog which allows user to select the governor they want active. The currently active governor will be selected by default.
    #User's input will go to the wantedGovernor variable for future use.
    wantedGovernor=$(zenity --list --text "Select which governor you want to make active:" --radiolist --column "" --column "Options" $optionPerformance "performance" $optionOndemand "ondemand")
    #Check to see if user clicked Cancel button.
    if [ $? = 1 ]
    then exit 0
    fi
    #Did user select the already active profile? If so, simply report that and exit.
    if [ $wantedGovernor = $currentGovernor ]
    then
    newGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    zenity --info --text "Governor is already set to $newGovernor.\n\nNo changes were made."
    exit 0
    fi
    #Now that we know what the user wants, let's do it.
    #We will use cpupower to change the governor. This will require root privileges, so we will use ktsuss to get that.
    ktsuss cpupower frequency-set -g $wantedGovernor
    #Now that we've made the change, let's check the current state of the governor again so that we can report it to the user and they can verify success.
    newGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
    zenity --info --text "Governor is now set to $newGovernor."

  • Script to change logon wallpaper on windows XP and 7 ...

    Hi there,
    We have both windows XP and windows 7 in our organization and just wondering how to change the logon wallpaper via script.
    We're in a subdomain of a larger network and they haven't made a move to Server 2008 ... so group policy is not possible.
    what we need is a script to auto-detect whether it's a windows XP or 7, then apply the necessary registry settings.
    I found the way to run a script / modify registry settings to change the logon wallpaper by modifying the registry settings manually and then export it to a network location (edit it as necessary), and then run the script --> regedit.exe /s filename.reg
    - Windows XP
        http://www.tweaklibrary.com/System/Startup-and-Shutdown/60/Set-the-log-on-tile-screen-wallpaper/10626/
    - Windows 7
        http://www.techspot.com/guides/224-change-logon-screen-windows7/
    We can't apply both settings at the same time since since the regKey is different between xp and 7.
    help?

    Hey
    Here is an updated version, checks if the image file exists rather than assuming it does and removes a the MsgBox i was using for testing. Let me know if you have any trouble with it.
    Cheers Matt :)
    'Script Name : SetLogonWallPaper.vbs
    'Author : Matthew Beattie
    'Created : 09/06/10
    'Description : This script sets the Logon WallPaper based on the operating system type.
    'Initialization Section. Define and Create Global Variables.
    Option Explicit
    Dim objFSO, wshShell, systemPath, fileSpec
    On Error Resume Next
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set wshShell = CreateObject("WScript.Shell")
    systemPath = wshShell.ExpandEnvironmentStrings("%WinDir%")
    ProcessScript
    If Err.Number <> 0 Then
    WScript.Quit
    End If
    On Error Goto 0
    'Name : ProcessScript -> Primary Function that controls all other script processing.
    'Parameters : None ->
    'Return : None ->
    Function ProcessScript
    Dim regKey, version, systemType
    regKey = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductName"
    version = ReadRegistry(regKey)
    'Set variable's based on the operating system version that has been read from the registry.
    Select Case version
    Case "Windows 7 Ultimate"
    systemType = 0
    fileSpec = systemPath & "\oobe\Info\Backgrounds\backgroundDefault.jpg"
    Case "Microsoft Windows XP"
    systemType = 1
    fileSpec = systemPath & "\Web\Wallpaper\Bliss.bmp"
    Case Else
    Exit Function
    End Select
    'Ensure the image file exists before attempting to configure the Logon Wallpaper.
    If Not objFSO.FileExists(fileSpec) Then
    Exit Function
    End If
    'Set the Logon Wallpaper based on the operating system type.
    If Not SetLogonWallPaper(systemType) Then
    Exit Function
    End If
    End Function
    'Name : ReadRegistry -> Read the value of a registry key or value.
    'Parameters : key -> Name of the key (ending in "\") or value to read.
    'Return : ReadRegistry -> Value of key or value read from the local registry (blank is not found).
    Function ReadRegistry(ByVal key)
    Dim result
    If StrComp(Left(key, 4), "HKU\", vbTextCompare) = 0 Then
    Key = "HKEY_USERS" & Mid(key, 4)
    End If
    On Error Resume Next
    ReadRegistry = WshShell.RegRead(key)
    If Err.Number <> 0 Then
    ReadRegistry = ""
    End If
    On Error Goto 0
    End Function
    'Name : SetLogonWallPaper -> Sets the Logon Wallpaper registry settings based on the operating system type.
    'Parameters : systemType -> Integer identifying the operating system type.
    'Return : SetLogonWallPaper -> Returns True if the LogonWallPaper registry settings were updated otherwise False.
    Function SetLogonWallPaper(systemType)
    Dim elements, element, regKey, regValue, regType
    SetLogonWallPaper = False
    'Set the registry settings to configure based on the systemType integer.
    Select Case systemType
    Case 0
    elements = Array("HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background\OEMBackground,1,REG_DWORD")
    Case 1
    elements = Array("HKEY_USERS\.Default\Control Panel\Desktop\TileWallpaper,0,REG_SZ", _
    "HKEY_USERS\.Default\Control Panel\Desktop\WallpaperStyle,2,REG_SZ", _
    "HKEY_USERS\.Default\Control Panel\Desktop\Wallpaper," & fileSpec & ",REG_SZ")
    Case Else
    Exit Function
    End Select
    'Split the array elements and configure the registry settings.
    For Each element In elements
    On Error Resume Next
    regKey = Split(element, ",")(0)
    regValue = Split(element, ",")(1)
    regType = Split(element, ",")(2)
    wshShell.RegWrite regKey, regValue, regType
    If Err.Number <> 0 Then
    Exit Function
    End If
    On Error Goto 0
    Next
    SetLogonWallPaper = True
    End Function

Maybe you are looking for