From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access window registry from DIAdem script?

Solved!
Go to solution

How to access (read/write) windows registry from DIAdem script?  Would anyone give me some examples?

 

Thank you

0 Kudos
Message 1 of 5
(5,477 Views)
dim wsh : set wsh = CreateObject ("WScript.Shell")
dim regvalue  : regvalue= wsh.RegRead("HKLM\Software\???")

 Check MS documentation on it.

0 Kudos
Message 2 of 5
(5,469 Views)

The statement (Wscript.Echo "this is a test"  )  does not work in the DIAdem script file. I am new to scripting language. 

 

 

0 Kudos
Message 3 of 5
(5,455 Views)
Solution
Accepted by NiCoder

Thats right but

dim wsh : set wsh = CreateObject ("WScript.Shell")
wsh.Popup "This is a script"

 would work.

 

the wscript object is not available in DIAdem. Its only available if you start a vbs by wscript.exe

Message 4 of 5
(5,442 Views)

Just a quick add:

 

If a * .VBSD file is run by the DataFinder, access to 'HKLM\SOFTWARE\*' does not work, reading keys there returns error.
I tried to use the section 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*', and its it works.

 

0 Kudos
Message 5 of 5
(2,686 Views)