MSFN Forum: .INF Files - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

.INF Files Commands for inf files. Rate Topic: -----

#1 User is offline   Worf 

  • Worf
  • PipPip
  • Group: Members
  • Posts: 187
  • Joined: 26-October 04

Posted 22 December 2006 - 10:50 PM

Hi



I 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.AddShortcut



how do i get it to install a short cut to the Startup Folder please?



Many Thanks



Worf.



P.S. Merry Christmas to all

This post has been edited by Worf: 22 December 2006 - 11:07 PM



#2 User is offline   ricktendo64 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,125
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 23 December 2006 - 12:11 AM

Heres a example of a profile Item...

Quote

ProfileItems=SpyBlast.Short

[SpyBlast.Short]
Name =SpywareBlaster
CmdLine =16422,%SPYBLAST%,spywareblaster.exe
SubDir =%SPYBLAST%
WorkingDir=16422,%SPYBLAST%

[Strings]
SPYBLAST="SpywareBlaster"


Read more about ProfileItmes http://mirror.ryanvm.net/mrspeel/OSR_Guide...g_INF_Files.zip

You can also download this addon and check it out http://www.sokoolz.com/addons/r64/Ricks_CC...6.430_AddOn.rar

BTW the 0x00000001 flag means that it will create the shortcut in Current Uses instead of All Users

#3 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 23 December 2006 - 07:51 AM

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 directory
setup.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 directory
Name		= Windows Media Player,1
CmdLine		= 16422,Windows Media Player,wmplayer.exe
SubDir		= Startup 
Remove the semicolon from either UpdateInis, ProfileItems or both under DefaultInstall in order to test
As 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!

#4 User is offline   Worf 

  • Worf
  • PipPip
  • Group: Members
  • Posts: 187
  • Joined: 26-October 04

Posted 23 December 2006 - 10:41 AM

Thank you for your help.

#5 User is offline   Ver Greeneyes 

  • Member
  • PipPip
  • Group: Members
  • Posts: 128
  • Joined: 03-December 04

Posted 23 December 2006 - 12:25 PM

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%\shortcut
setup.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 line
setup.ini,progman.groups,,Location=%24%\shortcut
which always has the syntax
setup.ini,progman.groups,,[variable name]=[location of the folder where the shortcut is to be placed]
Simple, right?

Then the next line
setup.ini,Location,,"Shortcut,%24%\test\test.exe"
has the syntax
setup.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 Launch
setup.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 :P

Hope this helps, below are some links with more info:

http://www.microsoft.com/technet/prodtechn...p.mspx?mfr=true
http://www.microsoft.com/technet/prodtechn...f.mspx?mfr=true
http://www.robvander...hortcutinf.html

This post has been edited by Ver Greeneyes: 23 December 2006 - 12:27 PM


#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 23 December 2006 - 05:10 PM

View PostVer Greeneyes, on Dec 23 2006, 06:25 PM, said:

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?

#7 User is offline   ricktendo64 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,125
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 23 December 2006 - 05:57 PM

Here is my QuickLaunch shortcut trick

Quote

ProfileItems=QuickLaunch.AddShortcut

[QuickLaunch.AddShortcut]Name =Windows Sidebar,0x00000001
CmdLine =16422,%SIDEBAR%,sidebar.exe
SubDir =%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"


#8 User is offline   Ver Greeneyes 

  • Member
  • PipPip
  • Group: Members
  • Posts: 128
  • Joined: 03-December 04

Posted 24 December 2006 - 02:09 PM

View PostYzöwl, on Dec 23 2006, 05:10 PM, said:

View PostVer Greeneyes, on Dec 23 2006, 06:25 PM, said:

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?

#9 User is offline   Worf 

  • Worf
  • PipPip
  • Group: Members
  • Posts: 187
  • Joined: 26-October 04

Posted 24 December 2006 - 02:51 PM

Thank you all again for this information, will come in handy for future addons

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy