Quantcast
start up script question - Beyond.ca - Car Forums
Results 1 to 7 of 7

Thread: start up script question

  1. #1
    Join Date
    Feb 2006
    Location
    Calgary,Alberta Canada
    Posts
    186
    Rep Power
    0

    Default start up script question

    Im trying to create a script that checks to see what version of symantec you have on your pc.

    Since it needs to query the registry I used the REG QUERY Command. HOW CAN I ONLY GET IT ONLY GET THE 11.0.4000 and not the rest REG_SZ


    Command Used
    REG query "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v ProductVersion

    RESULT
    **********
    H:\>REG query "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v Produ
    ctVersion

    ! REG.EXE VERSION 3.0

    HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC
    ProductVersion REG_SZ 11.0.4000.2295
    **********

    WHAT I NEED
    11.0.4000.2295 Displayed

  2. #2
    Join Date
    Nov 2008
    Location
    Edmonton
    My Ride
    07' Balt SS
    Posts
    42
    Rep Power
    0

    Default

    Probably some fancy string manipulation needed. There doesn't seem to be a switch to only show the data.

    Why not just use the Management Console to view the install version among clients? Besides the fact its a web based POS wannabe managment console.

    You've also reminded me I need to update our AV. Still on 11R2!

  3. #3
    Join Date
    Jul 2008
    Location
    Calgary, Alberta
    Posts
    98
    Rep Power
    0

    Default

    Code:
    for /f "tokens=3" %%a in ('REG QUERY "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v ProductVersion') do (
    echo %%a
    )
    You will probably have to change the tokens=3 to a different value. I'm guessing 5, by the registry key you are looking for.

  4. #4
    Join Date
    Nov 2003
    Location
    Calgary
    Posts
    521
    Rep Power
    21

    Default

    Just use a vbscript to query the exact key, then check on that version.

  5. #5
    Join Date
    Feb 2006
    Location
    Calgary,Alberta Canada
    Posts
    186
    Rep Power
    0

    Default

    Do you guys see something wrong with this statement? I keep getting an error

    FOR /F "tokens=3 delims " %%G IN (REG query "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" | FIND "ProductVersion") DO @echo %%G

  6. #6
    Join Date
    Jul 2008
    Location
    Calgary, Alberta
    Posts
    98
    Rep Power
    0

    Default

    Originally posted by Gorilla
    Do you guys see something wrong with this statement? I keep getting an error

    FOR /F "tokens=3 delims " %%G IN (REG query "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" | FIND "ProductVersion&quot DO @echo %%G
    The whole statement is basically wrong. You're missing an equal sign after delims (which defaults to space anyway). And you should just use /v ProductVersion instead of find. I don't think pipe works inside a for command like that.

    Anyway, I also got your PM, and now that I realize you only need to test for a specific version there is an easier way to do this.

    See, you don't need to isolate the version number, you just need to test and see if the string matches the version you're looking for. This script will do what you want:
    Code:
    REG query "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v ProductVersion | FIND "11.0.4000.2295"
    IF NOT ERRORLEVEL 1 SymantecUpdater.exe
    That will run the SymantecUpdater.exe file if the version 11.0.4000.2295 is found. If you want it to run if that version is NOT found then remove the "NOT" from the IF statement.

  7. #7
    Join Date
    Feb 2006
    Location
    Calgary,Alberta Canada
    Posts
    186
    Rep Power
    0

    Default

    Thanks for all your help!!!

Similar Threads

  1. Widgetbucks script

    By Strider in forum Suggestion/Comment Box/Forum Related Stuff
    Replies: 2
    Latest Threads: 03-12-2008, 10:14 PM
  2. Replies: 1
    Latest Threads: 03-03-2006, 10:15 AM
  3. Command Start 250i,260i Cold start options

    By Jon Goddie in forum In Car Entertainment / Electronics
    Replies: 3
    Latest Threads: 10-23-2005, 10:01 PM
  4. Arctic Start Or Auto Start

    By brodmeister in forum In Car Entertainment / Electronics
    Replies: 4
    Latest Threads: 09-05-2005, 08:54 PM
  5. .BAT script file

    By Glowrider in forum General
    Replies: 9
    Latest Threads: 03-26-2003, 07:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •