proximous Posted August 31, 2008 Posted August 31, 2008 I'd prefer to have only one WMP11 anywhere in my installation, and I'd like it at: START MENU->MULTIMEDIA->Windows Media Player.lnkIn my WINNT.SIF I have:[AddComponents]WMPOCM = OffThis 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,3ProfileItems =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/25description=WMP Shortcutlanguage=Englishtitle=WMP Shortcutversion=1.0.0.0website=[sysoc]WMPsc=ocgen.dll,OcEntry,WMPsc.inf,HIDE,7[dosnet_files]d1,WMPsc.inf[txtsetup_files]WMPsc.inf = 1,,,,,,,20,0,0I never get the shortcut.Any ideas? I must be missing something simple? Quote
ricktendo Posted August 31, 2008 Posted August 31, 2008 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 PlayerCmdLine = 16422,"Windows Media Player",wmplayer.exe /prefetch:1SubDir = MultimediaWorkingDir = 16422,"Windows Media Player"InfoTip ="@%%SystemRoot%%\system32\unregmp2.exe,-160"DisplayResource="%%SystemRoot%%\system32\unregmp2.exe",4Look in unregmp2.exe/String Table with a resource editor and you will find the localized shortcut name (DisplayResource) and info tipBTW if you want to have less INF files just add this profileitem to wmp.inf Quote
proximous Posted August 31, 2008 Author Posted August 31, 2008 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? Quote
ricktendo Posted August 31, 2008 Posted August 31, 2008 Before:CmdLine = 16422,"Windows Media Player",wmplayer.exe "/prefetch:1"After:CmdLine = 16422,"Windows Media Player",wmplayer.exe /prefetch:1The 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/copiedSYSSETUP.INF[Infs.Always]...wmp.inf,InstallWMP7Edit: 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? Quote
proximous Posted August 31, 2008 Author Posted August 31, 2008 (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 August 31, 2008 by proximous Quote
ricktendo Posted August 31, 2008 Posted August 31, 2008 [AddDirective]WMP.INF,WMP.AddShortcut[EditFile]WMP.INF,InstallWMP7,AddProfileItemsWMP.INF,WMP.AddShortcut,AddAddShortcut[AddProfileItems]ProfileItems = WMP.AddShortcut[AddAddShortcut]Name = Windows Media PlayerCmdLine = 16422,%MP2_FOLDER%,wmplayer.exe /prefetch:1SubDir = MultimediaWorkingDir = 16422,%MP2_FOLDER%InfoTip = "@%%SystemRoot%%\system32\unregmp2.exe,-160"DisplayResource = "%%SystemRoot%%\system32\unregmp2.exe",4 Quote
proximous Posted September 3, 2008 Author Posted September 3, 2008 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! Quote
proximous Posted December 20, 2008 Author Posted December 20, 2008 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.