# VBS-Multiple Variables In 1 Msg Box



## brendandonhu (Jul 8, 2002)

I am using this VBS code to pull some info from the registry and display it.

Set WSHShell = WScript.CreateObject("WScript.Shell") 
IPaddy="HKLM\Software\KaZaA\my_ip_address" 
WScript.Echo "IP address: " & WSHShell.RegRead(IPaddy) 

Set WSHShell = WScript.CreateObject("WScript.Shell") 
Klocation="HKLM\Software\KaZaA\Cloudload\ExeDir" 
WScript.Echo "Kazaa Installed to: " & WSHShell.RegRead(Klocation)
Wscript.quit(0) 

It works, but it shows the IP and Kazaa installed to: in different message boxes, obviously because I have a seperate Wscript.Echo for each one. How can I have one box that dispalys both variables (IPaddy and Klocation)? I tried a couple things but it didn't work.

TIA


----------



## Big Otis (Jul 23, 1999)

Try this:

Set WSHShell = WScript.CreateObject("WScript.Shell") 
IPaddy="HKLM\Software\KaZaA\my_ip_address" 

Klocation="HKLM\Software\KaZaA\Cloudload\ExeDir" 
WScript.Echo "IP address: " & WSHShell.RegRead(IPaddy) & vbcrlf & "Kazaa Installed to: " & WSHShell.RegRead(Klocation)
Wscript.quit(0)


----------



## brendandonhu (Jul 8, 2002)

Cool It works  
Thx a lot Big Otis, but if you don't mind 1 more question, what is the vbclrf?


----------



## deuce868 (Nov 2, 2000)

> what is the vbclrf?


carriage return & line feed


----------



## brendandonhu (Jul 8, 2002)

Ok thanks a lot


----------

