check vista or xp

Discussion in 'Scripting' started by nico, Sep 3, 2009.

  1. nico

    nico Guest

    i would like to have a script where it checks if the users logs on a xp or
    vista machine.

    so i can copy the c:\user to vista clients

    tx for any info
    nico, Sep 3, 2009
    1. Advertisements

  2. You could use the "ver" command in a batch file environment. In VB Scripts
    it takes a little more than three letters. It also takes longer to execute.

    Set OSSet = GetObject("winmgmts://." _
    & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem")
    For Each OS In OSSet
    wscript.echo OS.Caption, OS.CSDVersion
    Pegasus [MVP], Sep 3, 2009
    1. Advertisements

  3. nico

    nico Guest

    great, thank you, that was whatr i was looking for.
    nico, Sep 4, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.