Jump to content

luppybob

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About luppybob

luppybob's Achievements

0

Reputation

  1. Thank you again, I will give it a try. The lines I used was just an example. I plan to use the IP address in a different command, just wanted to give you something quick and fast. Best regards.
  2. Hello, This worked great, thanks again. Got another question along this topic ... do you know if there is away to capture a value in the registry and use it as a parameter in a command line, within the same batch file? For example, in a batch file, if I run the following command: reg query "HKLM\SOFTWARE\Intervade Software\Audit\Network" /v Destination My output is such: HKEY_LOCAL_MACHINE\SOFTWARE\Intervade Software\Audit\Network Destination REG_SZ 127.0.0.1 Then, in the same batch file, I want to add "127.0.0.1" into the command line as such: reg add "HKLM\SOFTWARE\Intervade Software\Audit\Network" /v Destination /t REG_SZ /d 127.0.0.1 /f Thanks again in advance for your help.
  3. Hello, Thank you for your effort and prompt reply -- THIS DID WORK! Can you help me with one additional thing in this script: Basically, I want to do a couple of things if 3.1.3 is found. You had combined it in such a way, I am having difficulty inserting an "IF" statement. Say I want to do this: If [3.1.3] is found ( echo version 3.1.3 is installed c:\install\Snare314.exe c:\install\Snare314patch.exe echo version 3.1.4 successfully installed ) Thanks again for your great help!
  4. I am trying to do a similar thing, but my Reg Query output starts off with 4 spaces and also has a delimiter of 4 spaces, as shown below. Any idea how I can get this to work? Input is: reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Snare_is1" /v DisplayVersion Output is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Snare_is1 DisplayVersion REG_SZ 3.1.3 I tried these lines in the batch file, but it did not work: For /f "tokens=3 delims= " %%# In ( 'Reg query "%key%" /v DisplayVersion^|Find "REG_" 2^>Nul') Do Set "rel=%%#" If [%rel%]==[3.1.3] echo version 3.1.3 is installed Thanks in advance for anyone's assistance.
×
×
  • Create New...