Jump to content

Recommended Posts

Posted

sorry for my ignorance..

what i want to do is to read a value from registry,and then assign it to a declared variable in a bat file? how to achieve that?

any suggestion appreciated..


Posted

FOR /F "skip=4 tokens=2*" %%I IN ('REG QUERY "HKEY_CURRENT_USER\Environment" /V "TMP"') DO @SET TMP=%%J

If registry valueName(not registry data) contains space, change 2* to 3*, more spaces increase that digit.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...