How can I determine/ check if a registry key exists?

Navsyst2
Member Posts: 29
Hi..
can anyone help me with code example?
I am using automation 'Windows Script Host Object Model'.WshShell'
Which properties should I use to check it?
WshShell - Methods - (Run, Popup, CreateShortcut, ExpandEnvironmentStrings, RegRead, RegWrite, RegDelete, LogEvent, AppActivate, SendKeys, Exec)
Thanks.
can anyone help me with code example?
I am using automation 'Windows Script Host Object Model'.WshShell'
Which properties should I use to check it?
WshShell - Methods - (Run, Popup, CreateShortcut, ExpandEnvironmentStrings, RegRead, RegWrite, RegDelete, LogEvent, AppActivate, SendKeys, Exec)
Thanks.
0
Answers
-
It would help if you can explain what you're trying to do.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
Please use the search. I've posted an example of this here or at mbsonline.org0
-
Hi ajhvdb,
I've searched the forum before, but didn't found it. Just searched through all ypur posting, nothing
what I want to do?
I want to delete a registry key before starting one batchprogramm. But to delete it, i must check it if the registry exists, otherwise got an error.
I hope that it's enough.
Thanks.0 -
WSH groups have already solved this problem. You need to translate the code, which isn't that difficult. See:
http://groups.google.com/groups?as_q=re ... =100&hl=enNaji Shaman
http://www.autocloseidle.com0 -
ajhvdb wrote:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.mbsonline.org/forum/topic.asp?
The following error was encountered:
Connection Failed
I've seen many hyperlinks into mbsonline.org. If I clik it, I must be first log in. But after log in, I would lost the search result, which in the hyperlinks before. ](*,)
Do you have any idea?
Thanks.0 -
You're lucky
. I've downloaded the whole site before troubles began.
//Name-DataType-Subtype-Length //LatmWshShell-Automation-'Windows Script Host Object Model'.WshShell- //LvVAR1-Variant-- //LvVAR2-Variant-- //LvVAR3-Variant-- //LvValue-Variant-- CREATE(LatmWshShell); LvVAR1 := 'HKCU\Environment\TEST'; LvVAR2 := 'blablabla'; LvVAR3 := 'REG_SZ'; //Write LatmWshShell.RegWrite(LvVAR1, LvVAR2, LvVAR3); //Read LvValue := LatmWshShell.RegRead(LvVAR1); MESSAGE(FORMAT(LvValue)); CLEAR(LatmWshShell);
0 -
Navsyst2 wrote:Do you have any idea?No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Thanks luc for your help.
It would be better for me if you tell me the topics title too
Ok.. I solve it with indirect way.
First create the registry and then check it if Format('HKCU....') <> '' THEN
regDelete.
ajhvdb, thanks too for your help
Another idea is still welcome0 -
Navsyst2 wrote:Thanks luc for your help.
It would better for me if you tell me the topics title tooIt's better for your brain if you do some little exploration yourself.
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions