Jump to content

Creating shortcuts at installation time


Recommended Posts

Posted

[Version]
Signature  = $Windows NT$

[DefaultInstall]
UpdateInis = AddShortcut

[AddShortcut]
setup.ini, progman.groups,, "group2=""%01%\testzone"""
setup.ini, group2,,"""Readme"",""""""%01%\README.TXT"""""""

this will make a shortcut in the inf location in the the 'testzone' dir to the file readme.txt

located in the inf directory.

am i right?


Posted

Let me do a series of tests on a 2000 installation, (may take a while), and see if the issue is OS related.

In the mean time it may help if you can give me a full run down of your requirements, you may do this via PM if preferred.

Posted

i run Windows 2000 SP4 MSIE 5.0 and FF 1.0.3

Kaspersky 5.0.121

when i right click -> install the inf file above i get the error: Installation Failed.

i run it as a Power User.

anyting else you need to know?

Posted
i run Windows 2000 SP4 MSIE 5.0 and FF 1.0.3

Kaspersky 5.0.121

The same configuration except for Kaspersky v3.5.133.0 ;)

This works fine:

[version]
signature=$chicago$
[DefaultInstall]
UpdateInis=AddShortcut
[AddShortcut]
setup.ini, progman.groups,, "group2=""%24%"""
setup.ini, group2,,"""Readme"",""""""%24%\readme.txt""""""

Sorry don't know how it is called in English - " - I found that it also plays role in this script (the quantity of ").

Regards,

Oleg 2

Posted

Ups...

I though you want to create the shortcut during unattended installation. Then it should work.

If you are using it after installation in a Power User mode why not just log as an Administrator, run the script and re-log as your Power User?

Reagards,

Oleg 2

  • 4 weeks later...
Posted

[Req] how can I creat Desktop shortcut to this Icons during Xp installation:

Task Manager

Disk Management

Performance

Management Infrastructure

Device Manager

Computer Management

Users & Groups

/ Help me please.

Posted

@ blabla03

This thread is not for requests, the information provided in the first post is sufficient to get you started, all you need to do is search for the specific shortcut commands.

As a one off, in the hope it helps tutorially here is what you need

[Version]
Signature = $Windows NT$

[DefaultInstall]
UpdateInis = AdminLinx

[AdminLinx]
;Task Manager
setup.ini, progman.groups,, "group0=""%16400%\"""
setup.ini, group0,,"""Task Manager"",""""""%11%\taskmgr.exe"""""""
;Disk Management
setup.ini, progman.groups,, "group1=""%16400%\"""
setup.ini, group1,,"""Disk Management"",""""""%11%\diskmgmt.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""
;Performance
setup.ini, progman.groups,, "group2=""%16400%\"""
setup.ini, group2,,"Performance,""""""%11%\perfmon.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""
;Management Infrastructure
setup.ini, progman.groups,, "group3=""%16400%\"""
setup.ini, group3,,"""Management Infrastructure"",""""""%11%\wmimgmt.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""
;Device Manager
setup.ini, progman.groups,, "group4=""%16400%\"""
setup.ini, group4,,"""Device Manager"",""""""%11%\devmgmt.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""
;Computer Management
setup.ini, progman.groups,, "group5=""%16400%\"""
setup.ini, group5,,"""Computer Management"",""""""%11%\compmgmt.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""
;Users & Groups
setup.ini, progman.groups,, "group6=""%16400%\"""
setup.ini, group6,,"""Users & Groups"",""""""%11%\lusrmgr.msc"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""

To test it copy & paste the contents of the code box into a new notepad file and Save As All Files adminlnk.inf, right click on adminlnk.inf and choose Install, now look on your Desktop.

Note

I will not be doing this again!

  • 2 weeks later...
Posted (edited)

thanx Yzwol for the hard work

I followed you tutorial precisely , at first I got confused but with your last Example,,,,,the Install Trick was cool to test your shourtcut.inf working or not!

ok I made a shortcuts.inf file . it worked great with Install and here it is:

[version]
signature=$chicago$

[DefaultInstall]
UpdateInis=AddShortcut

[AddShortcut]
; the first line is the final location of the shortcut
; the second line is the original location of the file
setup.ini, progman.groups,, "group7=""%16400%\"""
setup.ini, group7,,"""PowerToy Calc"",""""""%11%\powerCalc.exe"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""

;MSN Messenger 7
setup.ini, progman.groups,, "group8=""%16400%\"""
setup.ini, group8,,"""MSN Messenger 7"",""""""%16422%\MSN Messenger\msnmsgr.exe"""""""

but when I integrate it into RunOnceEx.cmd and try the ISO, something wrong happen:

infsetupfailed.png

??

here is my RunOnceEx.cmd:

REG ADD %KEY%\050 /VE /D "Adding User Defined Shortcuts" /f
REG ADD %KEY%\050 /V 1 /D "rundll32 setupapi,InstallHinfSection Shortcuts 128 %CDROM%\Softwares\shortcuts.inf" /f

please what wrong did I do?

Edited by Wesmosis
Posted (edited)

Try:

REG ADD %KEY%\050 /VE /D "Adding User Defined Shortcuts" /f
REG ADD %KEY%\050 /V 1 /D "rundll32 setupapi,InstallHinfSection DefaultInstall 132 %CDROM%\Softwares\shortcuts.inf" /f

Edited by MioKawaii
Posted (edited)

or to be on the safe side with your paths etc.

reg add %KEY%\050 /ve /d "Adding User Defined Shortcuts" /f
reg add %KEY%\050 /v 1 /d "%systemroot%\system32\rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %CDROM%\Softwares\shortcuts.inf" /f

<Edit>

From your inf, the section which contains the main command is

  • [DefaultInstall]
    UpdateInis=AddShortcut

You use the section name in your install command to perform the install. If you have a section name of 'DefaultInstall', this is used for the right click 'install' too. A good idea would therefore, in the majority of cases, be to use this section name in the majority of your infs. The 132 is used when the inf being run is not in the same location as the command calling it, as in this case where you are giving the location as a full path.

</Edit>

Edited by Yzöwl

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...