PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms..win.server.scripting > VB not working using SMS
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
VB not working using SMS

Réponse
 
LinkBack Outils de la discussion
Vieux 05/10/2007, 20h22   #1
James S. Borg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut VB not working using SMS

This is cross posted from SMS List because I am not sure if it a sript
issue, which I am a mere hack at, or an SMS issue.

I have created a VB Script to remove Office 2003 items from the Windows XP
Start Menu Pinned Items list.

I have tried creating a Package calling the VB, one that uses a bat file to
call the VB, and compiled the VB and bat file into an exe using the exe in
the package.

When I deploy any one of these using SMS 2003 they look like they run
successfully but they do not perform the desired task.

All three methods work outside of SMS. I have successfully deployed Office
2007 Using SMS, so I am not sure why this isn't working.

Anyone have any ideas?

Thanks,
James Borg

The VB is as follows.

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")

Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2003.lnk")

objFolderItem.InvokeVerb("Unp&in from Start Menu")



Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2003.lnk")


objFolderItem.InvokeVerb("Unp&in from Start Menu")


Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Office Access 2003.lnk")


objFolderItem.InvokeVerb("Unp&in from Start Menu")


Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint
2003.lnk")


objFolderItem.InvokeVerb("Unp&in from Start Menu")


Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Office Publisher
2003.lnk")


objFolderItem.InvokeVerb("Unp&in from Start Menu")


Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Documents and Settings\All
Users\Start Menu\Programs\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Office Outlook 2003.lnk")


objFolderItem.InvokeVerb("Unp&in from Start Menu")



  Réponse avec citation
Vieux 07/10/2007, 03h26   #2
James S. Borg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VB not working using SMS

Obtained the solution from Matthew Hudson on the SMS list.

He instructed me to setup to SMS Package to run as the user not
administrator. The package then worked.


"James S. Borg" <JB@nospam.postalias> wrote in message
news:ei7cLU4BIHA.4956@TK2MSFTNGP06.phx.gbl...
> This is cross posted from SMS List because I am not sure if it a sript
> issue, which I am a mere hack at, or an SMS issue.
>
> I have created a VB Script to remove Office 2003 items from the Windows XP
> Start Menu Pinned Items list.
>
> I have tried creating a Package calling the VB, one that uses a bat file
> to
> call the VB, and compiled the VB and bat file into an exe using the exe in
> the package.
>
> When I deploy any one of these using SMS 2003 they look like they run
> successfully but they do not perform the desired task.
>
> All three methods work outside of SMS. I have successfully deployed Office
> 2007 Using SMS, so I am not sure why this isn't working.
>
> Anyone have any ideas?
>
> Thanks,
> James Borg
>
> The VB is as follows.
>
> Set objShell = CreateObject("Shell.Application")
>
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
>
> Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2003.lnk")
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
>
> Set objShell = CreateObject("Shell.Application")
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
> Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2003.lnk")
>
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
> Set objShell = CreateObject("Shell.Application")
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
> Set objFolderItem = objFolder.ParseName("Microsoft Office Access
> 2003.lnk")
>
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
> Set objShell = CreateObject("Shell.Application")
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
> Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint
> 2003.lnk")
>
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
> Set objShell = CreateObject("Shell.Application")
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
> Set objFolderItem = objFolder.ParseName("Microsoft Office Publisher
> 2003.lnk")
>
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
> Set objShell = CreateObject("Shell.Application")
> Set objFolder = objShell.Namespace("C:\Documents and Settings\All
> Users\Start Menu\Programs\Microsoft Office")
> Set objFolderItem = objFolder.ParseName("Microsoft Office Outlook
> 2003.lnk")
>
>
> objFolderItem.InvokeVerb("Unp&in from Start Menu")
>
>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h24.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10405 seconds with 10 queries