Jump to content

Recommended Posts

Posted

hi can some one help or point me in the right direction im trying to figure out how i can add

shortcuts / enteries to the startup folders

by either inf or reg,, even a batch

thanks


Posted

do you mean add programs to the startup folder?

if so you could use a batch with xcopy in to copy the program to the allusers profile

or do you mean you need to know how to get it to actually create the shortcut?

Posted

Do you mean just once or every time windows starts up?

Do you mean just in 1 users profile or in every users profile?

more specific = more help in most cases.

Geez I read what I wrote above and it sounds like I'm being a smarta$$,

I don't mean it to though.

Posted
Do you mean just once or every time windows starts up?

Do you mean just in 1 users profile or in every users profile?

more specific = more help in most cases.

Geez I read what I wrote above and it sounds like I'm being a smarta$$,

I don't mean it to though.

lol no worries,, but i want to set a few programs in the start up folder so that they start up every time the pc starts auto,

i understand i could possibly use the xcopy cmd but what if the user created a sfx self extracting file to go to th program directory and therefor would not have a listing for it in the start menu,,, and i dont want it in the start menu,,, just the short to go in the startup folder because thats the start ups folders job, to start programs when the pc starts

any ideals

Posted (edited)

I gather your sfx archive has a program that doesn't need to be installed to run.

you could do what your after a few ways.

you could add a shortcut.inf file that will run when the sfx archive is executed to unpack your program to program files and will create the shortcut in the startup folder.

You could have the shortcut in the sfx archive have it extract the shortcut to startup folder when the sfx archive is unpacked to program files.

you could add a registry entry to the run key when the sfx archive is unpacked to program files and don't even worry about a shortcut file in the start up folder.

may I ask what are you using to make your sfx archive eg: 7-Zip, WinRar , WinZip , WinAce etc ?

is your sfx archive going to have user choices when executed eg: where the user can unpack it to?

If it's just a straight out no user choice and unpacks to program files then it makes it easier for you to set up what your after.

sorry to be asking more questions then giving answers, but it just makes it so I don't have type full examples of the above for everything when you prob only gunna use or need 1 method.

Edited by smashly
Posted

I'm not sure if this is what you want but if you create the sfx with winrar, in the sfx options - Advanced tab you have the option of creating shortcuts in the startup folder. From the help file

Here you may enter parameters a new shortcut, which will be created by SFX after unpacking. This dialog contains following fields:

Where to create

Choose where you wish to create a shortcut.

Source file name

Name of archived file.

Destination folder

Folder to place the shortcut in. If it is not exist, it will be created by SFX archive.

Shortcut description

Text describing a created shortcut.

Shortcut name

Name of .lnk (shortcut) file created by SFX.

Only "Where to create" and "Source file name" are required, all other parameters are optional.

Posted
I'm not sure if this is what you want but if you create the sfx with winrar, in the sfx options - Advanced tab you have the option of creating shortcuts in the startup folder. From the help file
Here you may enter parameters a new shortcut, which will be created by SFX after unpacking. This dialog contains following fields:

Where to create

Choose where you wish to create a shortcut.

Source file name

Name of archived file.

Destination folder

Folder to place the shortcut in. If it is not exist, it will be created by SFX archive.

Shortcut description

Text describing a created shortcut.

Shortcut name

Name of .lnk (shortcut) file created by SFX.

Only "Where to create" and "Source file name" are required, all other parameters are optional.

thanks benners but i tried that and this method dosnt seem to work at all for me, no matter what i do when i use the winrar options for shortcuts, it never creates, ive tried doing simple tests with te winrar shortcut creater and its seems to fail for me,, thats why im trying other methods,,

but thanks again for your advice

Posted

Here is an example of an inf

[Version]
Signature = $Windows NT$

[DefaultInstall]
UpdateInis = ProgLinx

[ProgLinx]
;program 1
setup.ini, progman.groups,, "group0=""%16408%\"""
setup.ini, group0,,"""ShortCut1 Name with spaces"",""""""%16422%\Directory1Name\Prog1Name.exe"""""""
;program 2
setup.ini, progman.groups,, "group1=""%16408%\"""
setup.ini, group1,,"ShortCut2Name_no_spaces,""""""%16422%\Directory2Name\Prog2Name.exe"""""",,,,""%HOMEDRIVE%%HOMEPATH%"""
;program 3
setup.ini, progman.groups,, "group2=""%16408%\"""
setup.ini, group2,,"""ShortCut3 Name with spaces"",""""""%16422%\Directory3Name\Prog3Name.exe"""" /s"",,,,""%HOMEDRIVE%%HOMEPATH%"""

In these examples,

  • All three shortcuts are created in %16408% which is a special code for %ALLUSERSPROFILE%\Start Menu\Programs\Startup
    The program executables are all found in %16422% which is a special code for %ProgramFiles%
    In the second and third examples, the %HOMEDRIVE%%HOMEPATH% is the Start-in section of the shortcut. (optional)
    You will see a difference in numbers of quotation marks depending upon spaces in the shortcut names.
    Finally the third example shows a method of incorporating a program to run with a switch, in this case /s.

Hope the info helps

Posted (edited)

Strange, I have made an sfx exe containing Notepad, this is copied to the Program Files directory and a shortcut created in the startup folder.

Try it and see if it works for you, ok for me.

Notepad.rar

Edited by benners
Posted
;The comment below contains SFX script commands

Path=Notepad

SavePath

Silent=1

Overwrite=1

Shortcut=T, "%ProgramFiles%\Notepad\Notepad.exe", "", "Opens Notepad Editor", "Notepad"

impressive it actually works,, hey benners could you make one more sample for me using muliple short cuts say

1 on desktop

1 on startup folder

and 1 for the in the start>all programs directory

and have theme all combined into the same installer

and also can you pls clairify for me what version of winrar your using,

thanks again,

Posted (edited)

Done and replaced 1st notepad.rar in previous post. If you want more flexiblity, use Inno Setup, this has more scope for shortcut and file placement.

forgot to add Winrar v3.51

Edited by benners
Posted

In the comment file:

  • Start Menu - Shortcut=S
    Desktop - Shortcut=D
    Start Menu\Programs - Shortcut=P
    Startup - Shortcut=T

Posted

thanks for the recreation benners,, hey i think i see where i went wrong on my previous atemps with creating the shortcuts this way..

can you tell me how necessary it is to use system variables instead of straight paths,, ex .. "C:\Program Files\Notepad"

because thats looks like where im messing up at

========

hey before i actually let this thread die can you answer me 1 more question

when using a winrar to make a self extracting sfx file

is it possible to make 2 different folders with in the sfx extract to 2 different areas say

1 in program files

the other in application data

ive been doing this with 2 seperate sfx files so i was just curious if it was possible to combine theme into 1 single sfx file

the method ive been useing was pack the other sfx file into an sfx file and have the main one run the inner sfx

strange method huh but it works just trying to make it more better if its possible

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