Worf Posted December 23, 2006 Share Posted December 23, 2006 (edited) HiI want to make an addon of a program and i want the program to insert a short cut to the Start Up folder on instalation from an INF file, i have found the line below in the INF file which creates a short cut to the programs folder but it does not create on in the Start Up folder.ProfileItems =Name.AddShortcuthow do i get it to install a short cut to the Startup Folder please?Many ThanksWorf.P.S. Merry Christmas to all Edited December 23, 2006 by Worf Link to comment Share on other sites More sharing options...
ricktendo Posted December 23, 2006 Share Posted December 23, 2006 Heres a example of a profile Item... ProfileItems=SpyBlast.Short[SpyBlast.Short]Name =SpywareBlasterCmdLine =16422,%SPYBLAST%,spywareblaster.exeSubDir =%SPYBLAST%WorkingDir=16422,%SPYBLAST%[strings]SPYBLAST="SpywareBlaster"Read more about ProfileItmes http://mirror.ryanvm.net/mrspeel/OSR_Guide...g_INF_Files.zipYou can also download this addon and check it out http://www.sokoolz.com/addons/r64/Ricks_CC...6.430_AddOn.rarBTW the 0x00000001 flag means that it will create the shortcut in Current Uses instead of All Users Link to comment Share on other sites More sharing options...
Yzöwl Posted December 23, 2006 Share Posted December 23, 2006 The method will also depend largely upon the required content of the shortcut target.Examples:[Version]Signature = $Windows NT$[DefaultInstall];UpdateInis = WayOne;ProfileItems = WayTwo[WayOne];Startup shortcut - Windows Explorer opening in system32 directory;Replace %16391% with %16408% for 'All Users' Startup directorysetup.ini, progman.groups,, "group0=""%16391%\"""setup.ini, group0,,"""Windows Explorer"",""""""%10%\explorer.exe"""" /e,/root,%11%"""[WayTwo] ;Startup shortcut - Windows Media Player;Remove `,1` at end of Name string for 'All Users' Startup directoryName = Windows Media Player,1CmdLine = 16422,Windows Media Player,wmplayer.exeSubDir = StartupRemove the semicolon from either UpdateInis, ProfileItems or both under DefaultInstall in order to testAs you can see WayTwo is far easier to understand, but has limitations in the target field. Try to create the WayOne explorer command or even running an executable with a space in its name using WayTwo and you'll see what I mean.Hope this helps! Link to comment Share on other sites More sharing options...
Worf Posted December 23, 2006 Author Share Posted December 23, 2006 Thank you for your help. Link to comment Share on other sites More sharing options...
Ver Greeneyes Posted December 23, 2006 Share Posted December 23, 2006 (edited) Here's another method that's a bit more versatile because it allows you to place a shortcut anywhere. Unfortunately it's less well documented.Below I'll give the simplest possible example for using this method; this will create a shortcut called Shortcut to the file "test.exe" located in %SYSTEMDRIVE%\test and will place this shortcut in %SYSTEMDRIVE%\shortcut.[Version]Signature = $Windows NT$[DefaultInstall]UpdateInis = Shortcut[Shortcut]setup.ini,progman.groups,,Location=%24%\shortcutsetup.ini,Location,,"Shortcut,%24%\test\test.exe"Here %24% equals %SYSTEMDRIVE% (but beware: some inf environment variables do not work at all times during windows setup; for instance 16384 which is supposed to point to the Desktop -does not- work when you integrate an inf into your Windows CD).Now, the first step is obviously the UpdateInis section in DefaultInstall; but if you could work with the above methods I won't need to explain that. Secondly, we get to the syntax for the UpdateInis section. There are some things to note about this but here are the basics:First comes the linesetup.ini,progman.groups,,Location=%24%\shortcutwhich always has the syntaxsetup.ini,progman.groups,,[variable name]=[location of the folder where the shortcut is to be placed]Simple, right?Then the next linesetup.ini,Location,,"Shortcut,%24%\test\test.exe"has the syntaxsetup.ini,[variable name],,[shortcut creation syntax surrounded by quotes]The syntax for shortcut creation is a bit more complicated, but here it is:[LinkTitle],[Target],[icon_file],[icon_index],[Profile],[start In],[Description]Of those, I only used the first two above, and for your average shortcuts that's enough.Okay, so, fine. We can create shortcuts anywhere, huzzah. But wait, there's a catch. What if we have directories (or file names, for that matter) which contain spaces? "Just use quotes", you might think, but unfortunately it's not that simple. In fact I can't tell you the exact rules, but I've found experimentally that for the simplest form, using only the first two parts of the syntax, you need to surround the target with -six-, that's 6, pairs of double quotes, or it will not work.Note that this is not true for the first line in the inf, as my next example will show.If I wanted to make a quicklaunch shortcut called "Somewhat more compolicated" to a file in my My Documents folder called "Somewhat more complicated.exe", here's how to do it.[Version]Signature = $Windows NT$[DefaultInstall]UpdateInis = Shortcut[Shortcut]setup.ini,progman.groups,,QLaunch=%16410%\Microsoft\Internet Explorer\Quick Launchsetup.ini,QLaunch,,"Somewhat more complicated,""""""%53%\My Documents\Somewhat more complicated.exe"""""""Note the seven quotes at the end; this is because I'm not using the other sections so I'm ending the syntax there.Of course there's no real point in using this method for a quicklaunch shortcut (though I think it's easier after you get used to it) except that it seems to create shortcuts that only contain the needed information, so they're usually smaller Hope this helps, below are some links with more info:http://www.microsoft.com/technet/prodtechn...p.mspx?mfr=truehttp://www.microsoft.com/technet/prodtechn...f.mspx?mfr=truehttp://www.robvanderwoude.com/shortcutinf.html Edited December 23, 2006 by Ver Greeneyes Link to comment Share on other sites More sharing options...
Yzöwl Posted December 23, 2006 Share Posted December 23, 2006 Here's another method that's a bit more versatile<snip>Did you see my posting?In it I used two methods.Does the first look familiar at all? Link to comment Share on other sites More sharing options...
ricktendo Posted December 23, 2006 Share Posted December 23, 2006 Here is my QuickLaunch shortcut trickProfileItems=QuickLaunch.AddShortcut[QuickLaunch.AddShortcut]Name =Windows Sidebar,0x00000001CmdLine =16422,%SIDEBAR%,sidebar.exeSubDir =%QUICKL%WorkingDir=16422,%SIDEBAR%InfoTip ="Displays personalized slideshows, news feeds, and other customized information on the desktop."[strings]SIDEBAR="Windows Sidebar"QUICKL ="..\..\Application Data\Microsoft\Internet Explorer\Quick Launch" Link to comment Share on other sites More sharing options...
Ver Greeneyes Posted December 24, 2006 Share Posted December 24, 2006 Here's another method that's a bit more versatile<snip>Did you see my posting?In it I used two methods.Does the first look familiar at all?Um.. oops? Link to comment Share on other sites More sharing options...
Worf Posted December 24, 2006 Author Share Posted December 24, 2006 Thank you all again for this information, will come in handy for future addons Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now