Add Start Menu Shortcut Manually

R

Ramesh, MS-MVP

The total Count returns 12, but only 6 are displayed.

--------------
set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("G:\Windows\System32")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs
msgbox objItemVerbs.count

For i = 0 to objItemVerbs.count -1
msgbox objItemVerbs.item(i)
i = i + 1
Next

set objItemVerbs = nothing
set objFolderItem = nothing
set objFolder2 = nothing
set objShell = nothing
 
R

Ramesh, MS-MVP

Unnecessary incrementation, my mistake. Anyway the extended "Pin" menu does
not show.
 
D

David Candy

I just noticed i=+1 at the end of script

Yet the msgbox only shows n times, less than the number of items. I note Explore is hidden. I changed to a safer folder than windir (which gives me 1 more item than system32). Now I'll try a doit on verb 1 (the second which I presume is explore) and it crashes.

set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs
msgbox objItemVerbs.count

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A
msgbox i
objItemVerbs.item(i),doit
i = i + 1
Next

So 4 is blank (here at least)
 
D

David Candy

England was 0/24, went to shop and came back and now 3/32.

--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
"David Candy" <.> wrote in message I just noticed i=+1 at the end of script

Yet the msgbox only shows n times, less than the number of items. I note Explore is hidden. I changed to a safer folder than windir (which gives me 1 more item than system32). Now I'll try a doit on verb 1 (the second which I presume is explore) and it crashes.

set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs
msgbox objItemVerbs.count

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A
msgbox i
objItemVerbs.item(i),doit
i = i + 1
Next

So 4 is blank (here at least)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top