Click here to Skip to main content
15,911,786 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Steven J Jowett10-Apr-09 4:26
Steven J Jowett10-Apr-09 4:26 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Dave Kreskowiak10-Apr-09 3:28
mveDave Kreskowiak10-Apr-09 3:28 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Jon_Boy10-Apr-09 4:01
Jon_Boy10-Apr-09 4:01 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Sumit Prakash Sharma10-Apr-09 22:46
professionalSumit Prakash Sharma10-Apr-09 22:46 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Dave Kreskowiak11-Apr-09 6:52
mveDave Kreskowiak11-Apr-09 6:52 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Sumit Prakash Sharma27-Aug-11 3:13
professionalSumit Prakash Sharma27-Aug-11 3:13 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Dave Kreskowiak28-Aug-11 13:16
mveDave Kreskowiak28-Aug-11 13:16 
Questionvbscript for reading the registry and search with regular expression [modified] Pin
TheScripter9-Apr-09 23:58
TheScripter9-Apr-09 23:58 
Hi
Hope someone might help me out, since I'm stuck.
I have to search the registry of several computers to find if there is a
"PendingFileenameOperation" waiting. After some try and error, I've come up
with this solution where I read the registry and add all entries' to an
array, and then add each arrayitem to a string. I then intend to search the
string for a certain path. If the count is above 0 I have a
PendingFileRenameOperation" that requires a reboot.
My problem is as follows:

1) Is this the best way to solve this problem
2) I cant get my regular expression to work.

The code I've come up with is as follows:

Dim objShell
dim strPending, strSessionManager , strAllText
Dim arrFiles  ''array containing files that are being renamed
Set objRegEx = CreateObject("VBScript.Regexp")
objRegEx.Global = True
objRegEx.Pattern = "C:\Norman" ''regular expression finding all entries
containing "c:\norman\"

strPending = "PendingFileRenameOperations"  ''The regkey we're going to read
strSessionManager="HKLM\System\CurrentControlSet\Control\Session Manager\"
''the registry
Set objShell = CreateObject("WScript.shell")

arrFiles=objShell.Regread(strSessionManager & strPending)  'put all entries
in registry into the array
for each StrFile in arrFiles
strAllText= strAllText & " " & strFile ''add all entries into one long
string with spaces
next

set colMatches = objRegEx.Execute(strAllText)
if colMatches.count > 0 then
''Do something if there are keys in the given directory that is pending a
filerename operation.
end if


Any feedback would be greatly appreciated.

modified on Friday, April 10, 2009 6:29 AM

AnswerRe: vbscript for reading the registry and search with regular expression Pin
Dave Kreskowiak10-Apr-09 2:57
mveDave Kreskowiak10-Apr-09 2:57 
GeneralRe: vbscript for reading the registry and search with regular expression Pin
TheScripter10-Apr-09 3:49
TheScripter10-Apr-09 3:49 
GeneralRe: vbscript for reading the registry and search with regular expression Pin
Dave Kreskowiak10-Apr-09 4:22
mveDave Kreskowiak10-Apr-09 4:22 
QuestionRe: vbscript for reading the registry and search with regular expression Pin
TheScripter15-Apr-09 21:39
TheScripter15-Apr-09 21:39 
AnswerRe: vbscript for reading the registry and search with regular expression Pin
Dave Kreskowiak16-Apr-09 1:42
mveDave Kreskowiak16-Apr-09 1:42 
QuestionHow to disable TabPage of TabControl Pin
Sumit Prakash Sharma9-Apr-09 23:11
professionalSumit Prakash Sharma9-Apr-09 23:11 
AnswerRe: How to disable TabPage of TabControl Pin
Nilesh Hapse10-Apr-09 1:47
Nilesh Hapse10-Apr-09 1:47 
GeneralRe: How to disable TabPage of TabControl Pin
Sumit Prakash Sharma10-Apr-09 22:53
professionalSumit Prakash Sharma10-Apr-09 22:53 
AnswerRe: How to disable TabPage of TabControl Pin
Eddy Vluggen10-Apr-09 1:50
professionalEddy Vluggen10-Apr-09 1:50 
GeneralRe: How to disable TabPage of TabControl Pin
Sumit Prakash Sharma10-Apr-09 22:48
professionalSumit Prakash Sharma10-Apr-09 22:48 
GeneralRe: How to disable TabPage of TabControl Pin
Eddy Vluggen10-Apr-09 23:27
professionalEddy Vluggen10-Apr-09 23:27 
GeneralRe: How to disable TabPage of TabControl Pin
Sumit Prakash Sharma11-Apr-09 2:36
professionalSumit Prakash Sharma11-Apr-09 2:36 
Questionerror in the function parse mail Pin
kaustubh879-Apr-09 22:40
kaustubh879-Apr-09 22:40 
AnswerRe: error in the function parse mail Pin
Dave Kreskowiak10-Apr-09 2:51
mveDave Kreskowiak10-Apr-09 2:51 
Questiondifference between textbox.text = "" and textbox.clear Pin
nishkarsh_k9-Apr-09 22:18
nishkarsh_k9-Apr-09 22:18 
AnswerRe: difference between textbox.text = "" and textbox.clear Pin
Sumit Prakash Sharma9-Apr-09 22:53
professionalSumit Prakash Sharma9-Apr-09 22:53 
AnswerRe: difference between textbox.text = "" and textbox.clear Pin
Eddy Vluggen10-Apr-09 1:55
professionalEddy Vluggen10-Apr-09 1:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.