invokeVerb method in Vista



Hi,

I have read answers from you about scripting in windows and some of
the really useful to me!

I have a question about vbscripting in windows vista.
I have written a vbscript to pin a exe file on desktop to start menu
by using "invokeVerb("P&in to Start Menu").

Set objShell = CreateObject("Shell.Application")
strdesktopFld = objShell.SpecialFolders("Desktop")
Set objFolder = objShell.Namespace(strdesktopFld&"\")
Set objFolderItem = objFolder.ParseName("calc.exe")
objFolderItem.invokeVerb("P&in to Start Menu")
msgbox "wait.."

I have tried to use msgbox or wscript.sleep 1000 at the end but it
just nothing happen.

This script is work in XP and I just wonder if there is any scripting
tricks in vista.

Bests,
Alex
p.s. I have put this question in "microsoft.public.scripting.wsh"
groups.google
.



Relevant Pages

  • Re: Bringing Script MsgBox to foreground
    ... SP 2 system) that MsgBox becomes visible, but it does not get focus ... see the Microsoft Win32 documentation). ... which produces a visible Popup in the foreground, ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: Help with debugging
    ... How do I isolate the MSGBOX to only ... >> Dim objScriptExec ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: MsgBox to display while processing
    ... A MsgBox is displayed to ask user if they want to proceed. ... > I'd like to have a MsgBox display during the 30 seconds of processing to ... You could consider using HTA instead (*.HTA files ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: wscript.echo and MsgBox stop execution of my script. Solution?
    ... > for notifications only, yet continue to run my code even if a user ... MsgBox and wscript.echo both halt ... If you can use a free 3rd party utility, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Version of Scripting Host
    ... > I'm new to VBScripting - for that matter any scripting. ... is there a way to find out the version of the Scripting Host ... Copyright Microsoft Corporation 1996-2001. ...
    (microsoft.public.scripting.vbscript)