Jump to content

Recommended Posts

Posted

I'd prefer to have only one WMP11 anywhere in my installation, and I'd like it at: START MENU->MULTIMEDIA->Windows Media Player.lnk

In my WINNT.SIF I have:

[AddComponents]
WMPOCM = Off

This successfully prevents all of the default shortcuts.

I then created the following INF:

[Version]
Signature=$Windows NT$

[Optional Components]
WMPshortcut

[DefaultInstall]
ProfileItems =WMP.AddShortcut

[WMPshortcut]
OptionDesc="WMPshortcut"
Tip ="WMPshortcut"
Modes =0,1,2,3
ProfileItems =WMP.AddShortcut

[WMP.AddShortcut]
Name = "Windows Media Player"
CmdLine = 16422,"Windows Media Player",wmplayer.exe "/prefetch:1"
SubDir = "Multimedia"
WorkingDir = 16422,"Windows Media Player"
InfoTip = "Play digital media including music, videos, CDs, and DVDs."

If I right-click this and choose install, I get the shortcut I want.

However, if I put this in an addon like this:

[general]
builddate=2008/08/25
description=WMP Shortcut
language=English
title=WMP Shortcut
version=1.0.0.0
website=

[sysoc]
WMPsc=ocgen.dll,OcEntry,WMPsc.inf,HIDE,7

[dosnet_files]
d1,WMPsc.inf

[txtsetup_files]
WMPsc.inf = 1,,,,,,,20,0,0

I never get the shortcut.

Any ideas? I must be missing something simple?

Posted

Try this, this will work on any language BTW...It will localize the shortcut with whatever is written in unregmp2.exe (no matter what language)

[WMP.AddShortcut]
Name = Windows Media Player
CmdLine = 16422,"Windows Media Player",wmplayer.exe /prefetch:1
SubDir = Multimedia
WorkingDir = 16422,"Windows Media Player"
InfoTip ="@%%SystemRoot%%\system32\unregmp2.exe,-160"
DisplayResource="%%SystemRoot%%\system32\unregmp2.exe",4

Look in unregmp2.exe/String Table with a resource editor and you will find the localized shortcut name (DisplayResource) and info tip

BTW if you want to have less INF files just add this profileitem to wmp.inf

Posted

Thanks. I'll give it a try, though I'm a bit confused. It looks like your changes only affect localization. Does this also address why my version works for me as a logged in user, but not if I try to install it at T-13?

Posted

Before:

CmdLine	= 16422,"Windows Media Player",wmplayer.exe "/prefetch:1"

After:

CmdLine	= 16422,"Windows Media Player",wmplayer.exe /prefetch:1

The reason this does not work during sysoc (and another good reason to add it to wmp.inf) is because wmp is installed later on in the install process, its not done by sysoc.inf but by syssetup.inf...so your inf fails because its executed looooooong before wmplayer.exe has been installed/copied

SYSSETUP.INF

[Infs.Always]
...
wmp.inf,InstallWMP7

Edit: If you use nLite I can write a Entries_*.ini that could probably edit wmp.inf for you and add a profileitem...do you use nLite or the Integrator?

Posted (edited)

Thanks. I do use nLite, so I'd welcome your Entries_*.ini.

EDIT: Also, is there a way to do it during RunOnceEx that would work for either the Integrator or nLite? I do prefer to be agnostic.

Edited by proximous
Posted
[AddDirective]
WMP.INF,WMP.AddShortcut

[EditFile]
WMP.INF,InstallWMP7,AddProfileItems
WMP.INF,WMP.AddShortcut,AddAddShortcut

[AddProfileItems]
ProfileItems = WMP.AddShortcut

[AddAddShortcut]
Name = Windows Media Player
CmdLine = 16422,%MP2_FOLDER%,wmplayer.exe /prefetch:1
SubDir = Multimedia
WorkingDir = 16422,%MP2_FOLDER%
InfoTip = "@%%SystemRoot%%\system32\unregmp2.exe,-160"
DisplayResource = "%%SystemRoot%%\system32\unregmp2.exe",4

Posted

Hey Rick, thanks for the help. Unfortunately this didn't work for me. I'm guessing that from my first post, the "WMPOCM = Off" in my WINNT.SIF is somehow blocking this from working. When I get a chance, I'll kick-off a new build without that setting to confirm it is the problem.

If this is the case, is there a way to create the shortcut after the explorer shell/desktop is available?

From what I see, the RunOnceEx commands run, then the desktop theme gets applied, then I get a message along the lines of "Personalizing Windows Media Player". I'm guessing that for this to work, I have to create the shortcut after that "Personalizing..." message, or I need to not use "WMPOCM" in my WINNT.SIF, and instead find some other way to delete/prevent the default shortcuts in the start menu and quicklaunch from being created.

Ideas or recommendations?

Many thanks!

  • 3 months later...
Posted

I thought I'd point out that if you want the InfoTip to work, you have to make sure you point to the unregmp2.exe in your install. I don't know why mine's in a different location than Rick's, but mine is in the 'inf' directory, so I had to use the following:

InfoTip		 = "@%%SystemRoot%%\inf\unregmp2.exe,-160"
DisplayResource = "%SystemRoot%\inf\unregmp2.exe",4

Join the conversation

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

Guest
Reply to this topic...

×   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.

×
×
  • Create New...