Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass values from .vbs file to VisualBasic2008 EXE file`

Status
Not open for further replies.

MoleDirect

Technical User
Sep 4, 2007
45
US
I am working with the registry and i was looking for a way to read a registry entry, and show the result on the program...

At the moment, the .vbs method working for me is this...
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.RegRead("HKCU\Control Panel\Sound\Beep")

Which simply lets you know if your system beebs are on or off..

I wantet to make somthing in Visual Basic 2008 (beta) that does the same, but the coding was way over my head.. So what I am planning is including .vbs files that do the dirty work in the back ground, and read / write registry entries, and feed the results to the project file, so I can let the user know if system beeps are on or off.

If there is a simpler way to do this, i am wide open...

:)

Thanks!!!
 
This worked in VB.Net 1.1 so there's got to be something similar in 2008.

Code:
[green]' this goes before the class declaration[/green]
Imports Microsoft.Win32

[green]' this goes inside a procedure[/green]
Dim regSound As RegistryKey 

regSound = Registry.CurrentUser.OpenSubKey("Control Panel\Sound", True)

MessageBox.show(regBeep.GetValue("Beep"))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top