Jump to content


  • 0
sothpaw

Software Center to the Windows 7 Start Menu

Question

Okay Scripting Masters,

 

I'm not very good at doing scripts, but I know that a cscript or just a VBS script would work to "PIN" the "Software Center; C:\Windows\CCM\SCClient.exe" to the Start Menu. What would the code look like at getting that done?

 

 

Thanks again :)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

How about this, save it as a vbs script. Run it locally first to see if it is what you want before creating a package..

 

set WshShell = WScript.CreateObject("WScript.Shell" )
strStartMenu = WshShell.SpecialFolders("AllUsersStartmenu" )
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Software Center.lnk" )
oShellLink.TargetPath = "%SYSTEMROOT%\CCM\SCClient.exe"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%SYSTEMROOT%\CCM\SCClient.exe"
oShellLink.Description = "SCCM"
oShellLink.WorkingDirectory = "%HOMEPATH%"
oShellLink.Save

 

 

Rocket Man

Share this post


Link to post
Share on other sites

  • 0

Here is vbscript to pin the Software Center to the start menu.

Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft System Center 2012\Configuration Manager")
Set objFolderItem = objFolder.ParseName("Software Center.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
Next

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.