Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> how can i add extra shortcut, adding addition avariable and shortcut to script
carfan
post Sep 27 2007, 06:53 PM
Post #1


Advanced Member
***

Group: Members
Posts: 97
Joined: 18-April 07
Member No.: 5,809


United States


hey nuno:

here is an example of one of your scripts and the variable and shortcut builds:

[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack

so if i understand this correctly it will build a shortcut on desktop to example.exe. what i would like to do is
and another program within the same folder with a short cut for it. can i just add lines to the variables and
process sections to include the extra shortcuts for the other program??? ex:

[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example
%ProgramTitle%=Example2
%ProgramEXE%=example2.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack
Go to the top of the page
 
+Quote Post
MedEvil
post Sep 27 2007, 07:05 PM
Post #2


Advanced Member
***

Group: .script developer
Posts: 1,257
Joined: 29-December 06
Member No.: 2,192



Sorry, but you can't have two variables with the same name.

(IMG:../forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
carfan
post Sep 27 2007, 07:10 PM
Post #3


Advanced Member
***

Group: Members
Posts: 97
Joined: 18-April 07
Member No.: 5,809


United States


QUOTE(MedEvil @ Sep 27 2007, 02:05 PM) *
Sorry, but you can't have two variables with the same name.

(IMG:../forums/style_emoticons/default/cheers.gif)


so can i build a mini script with just the variable and process sections to add the shortcut for the other program from the first script?
Go to the top of the page
 
+Quote Post
MedEvil
post Sep 27 2007, 09:18 PM
Post #4


Advanced Member
***

Group: .script developer
Posts: 1,257
Joined: 29-December 06
Member No.: 2,192



I'm not familiar with the fine print of the Api.

But as a general solution:
- i would set the variables
- call the shortcut routine
- change the values of the variables
- call the shortcut routine again

(IMG:../forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
carfan
post Sep 27 2007, 11:28 PM
Post #5


Advanced Member
***

Group: Members
Posts: 97
Joined: 18-April 07
Member No.: 5,809


United States


QUOTE(MedEvil @ Sep 27 2007, 04:18 PM) *
I'm not familiar with the fine print of the Api.

But as a general solution:
- i would set the variables
- call the shortcut routine
- change the values of the variables
- call the shortcut routine again

(IMG:../forums/style_emoticons/default/cheers.gif)


like this?

[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack


[variables]
%ProgramTitle%=Example2
%ProgramEXE%=example2.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack
Go to the top of the page
 
+Quote Post
pedrole15
post Sep 28 2007, 12:23 AM
Post #6


Advanced Member
***

Group: .script developer
Posts: 221
Joined: 18-August 06
Member No.: 183


France


QUOTE(carfan @ Sep 27 2007, 06:53 PM) *
hey nuno:

here is an example of one of your scripts and the variable and shortcut builds:

[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack

so if i understand this correctly it will build a shortcut on desktop to example.exe. what i would like to do is
and another program within the same folder with a short cut for it. can i just add lines to the variables and
process sections to include the extra shortcuts for the other program??? ex:

[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example
%ProgramTitle%=Example2
%ProgramEXE%=example2.exe
%ProgramFolder%= Example

[process]
Add_Shortcut,Desktop
Add_Shortcut
unpack

Hi, carfan
Like this
CODE
[variables]
%ProgramTitle%=Example
%ProgramEXE%=example.exe
%ProgramFolder%= Example

[process]
//Add_Shortcut,[Type],[StartMenu_Folder],[FullFileName],[Title],[Work Folder],[Parameters],[IconFile(.ico .exe)],[StartMode(1,2,3,or 4)]
Add_Shortcut,Desktop
Add_Shortcut
Add_Shortcut,Desktop,,%PE_Program%\%ProgramFolder%\Example2.exe,Example2
Add_Shortcut,StartMenu,,%PE_Program%\%ProgramFolder%\Example2.exe,Example2
unpack


Example2.exe is in the same Encoded Folder so it is extracted in %ProgramFolder%
%PE_Program% is the path for ProgramFiles
Don't forget to give Title parameter

(IMG:../forums/style_emoticons/default/cheers.gif)
Pedro
Go to the top of the page
 
+Quote Post
carfan
post Sep 28 2007, 12:45 PM
Post #7


Advanced Member
***

Group: Members
Posts: 97
Joined: 18-April 07
Member No.: 5,809


United States


ok, lets see if i want to make a shortcut for a program called example2.exe in program files\example folder and use an icon file launcher.ico in the same folder it would look like this?
// programpath exe name icopath icofile
Add_Shortcut,Desktop,,%ProgramFilesDir%\Example\Example2.exe,Example2,Example,1,Launcher.ico,1
Add_Shortcut,StartMenu,,%ProgramFilesDir%\Example\Example2.exe,Example2,Example,1,Launcher.ico,1
unpack

right??? if not please show changes to actual script

Thanks a bunch for helping folks
carfan
Go to the top of the page
 
+Quote Post
pedrole15
post Sep 28 2007, 03:27 PM
Post #8


Advanced Member
***

Group: .script developer
Posts: 221
Joined: 18-August 06
Member No.: 183


France


QUOTE(carfan @ Sep 28 2007, 12:45 PM) *
ok, lets see if i want to make a shortcut for a program called example2.exe in program files\example folder and use an icon file launcher.ico in the same folder it would look like this?
// programpath exe name icopath icofile
Add_Shortcut,Desktop,,%ProgramFilesDir%\Example\Example2.exe,Example2,Example,1,Launcher.ico,1
Add_Shortcut,StartMenu,,%ProgramFilesDir%\Example\Example2.exe,Example2,Example,1,Launcher.ico,1
unpack

right??? if not please show changes to actual script

Thanks a bunch for helping folks
carfan

Hi,Carfan
First you must have the last Api (Version 6) and last Buildmodel (Version 45) for liveXP and nativeEx_barebone

%ProgramFilesDir% is not valid you must use :
%PE_Programs% (for %ProgramFiles% or x:\Program Files)
%SystemRoot% (for x:\I386 or x:\windows)

Work Folder: if not specified is set by default to the folder of the app
If you want to change the Work Folder you must give his fullPathName and have set parameter 3 (FullFileName)
So Add_Shortcut,Desktop,,,,%SystemRoot%\Temp ==> have no effect
But this is correct: Add_Shortcut,Desktop,,%PE_Programs%\Example\Example2.exe,Example2,%SystemRoot%\Temp

If you set the parameter 3 you must also give the parameter 4

For your example the correct setting is :
Add_Shortcut,Desktop,,%PE_Programs%\Example\Example2.exe,Example2,,1,Launcher.ico,1

==> Add a ShortCut on Desktop for Example2.exe located in x:\Program Files\Example\
==> Title for the ShortCut : Example2
==> Work Folder : x:\Program Files\Example\
==> Start Example2.exe with parameter : 1
==> Icon for Example2.exe : Launcher.ico
==> Start Example2.exe in : Normal mode

Note : there is a problem in LiveXP and nativeEx_barebone with StartMode not the fault of BuildModel !!!
Hope its clear
(IMG:../forums/style_emoticons/default/cheers.gif)
Pedro
Go to the top of the page
 
+Quote Post
« Next Oldest · Support and Bug reporting · Next Newest »
 

Fast ReplyReply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts Added scripts not showing in final vistape build
2 abuthemagician 107 9th October 2007 - 06:06 PM
Last post by: Nuno Brito
No New Posts Pinned: How to determine if a file is redistributable
Files within .scripts or hosted on boot-land servers
1 jaclaz 68 8th October 2007 - 10:48 AM
Last post by: psc
No new How can this be done?!
Directory must stay portable
20 DaemonForce 362 7th October 2007 - 09:31 AM
Last post by: jaclaz
No new Topic has attachmentsAdding Programs to VistaPE in menu
17 speed45 3,202 1st October 2007 - 07:13 AM
Last post by: online
No New Posts How to add Drivers ?
in a "VistaPE" already built !!!
6 Haiphong 357 28th September 2007 - 02:32 AM
Last post by: powaking


 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 12th October 2007 - 05:03 AM

MKPortal ©2003-2006 mkportal.it