Syntax of for [Iconfile] in Add_Shortcut
#1 Guest_Msenn_*
Posted 13 February 2008 - 02:10 PM
Add_shortcut,[Type],[Folder],[Title],[WorkFolder],[Parameter],[IconFile],[Startm
ode]
Where [IconFile]=X:\Windows\System32\Shell32.dll,6 (the sixth icon of Shell32.dll)
This doen't work.
How do I specify the position in the Dll of the icon?
Manfred
#2
Posted 13 February 2008 - 03:52 PM
#3 Guest_Msenn_*
Posted 13 February 2008 - 04:50 PM
#4 Guest_Msenn_*
Posted 14 February 2008 - 10:46 AM
Because commas are used by the scripting syntax to separate parameters, you need to use #$c in lieu of the literal within a single parameter. So the icon would be identified as "Shell32.dll#$c6".
Hi Arvy,
I did test your advice, but i hadn't success with it.
What is wrong in my syntax?
Add_Shortcut,"Desktop",,"X:\Program Files\Autoinst\Autoinst.vbs","Unattended Installation","X:\Program Files\Autoinst",,"X:\Windows\System32\Shell32.dll#&c6" ?
#5
Posted 14 February 2008 - 12:27 PM
Add_Shortcut,"Desktop",,"X:\Program Files\Autoinst\Autoinst.vbs","Unattended Installation","X:\Program Files\Autoinst",,"X:\Windows\System32\Shell32.dll#&c6"
'#$c' ?
#6
Posted 14 February 2008 - 01:42 PM
I wanted to provide a documentation link for the complete list of those #$ substitutions, but I can't seem to find it today. Maybe someone else will point to it for us. One of the most important is #$p in lieu of % where you want your script to insert an environment variable for later (post-build) handling by Windows (e.g., "#$pSystemRoot#$p" for "%SystemRoot%").
#7
Posted 14 February 2008 - 01:57 PM
#8 Guest_Msenn_*
Posted 14 February 2008 - 02:09 PM
A documentation would be good!Yes, that's it. Dollar sign, not amperand.
I wanted to provide a documentation link for the complete list of those #$ substitutions, but I can't seem to find it today. Maybe someone else will point to it for us. One of the most important is #$p in lieu of % where you want your script to insert an environment variable for later (post-build) handling by Windows (e.g., "#$pSystemRoot#$p" for "%SystemRoot%").
Besides my write error (only in forum, not in test environment) - it doesnot work, the icon is set to the default icon of wscript.exe (.vbs Extension).
All other parameters are right.
Maybe a '-' has to be added like this: ...\shell32.dll#$c-6 ?
According to the following hint I found this in the forum: associate_file,html,icon,%systemroot%\System32\Shell32.dll,-153 ?
I will make another test.
#9
Posted 14 February 2008 - 02:14 PM
If you use WB to edit/write your scripts, then you have the needed substitutions in the right click menu.
MedEvil,
That reminded me of something that has been around for at least the last few versions of Winbuilder. In the Script Editor, Rt Click (or Wizard Dropdown) => 'Special Chars' => 'Line break (#$x)' returns '#$s', the sub for a space! .... Nuno?
#10
Posted 14 February 2008 - 02:18 PM
I will make another test.
Yes! Very interested to hear if you can get it to work...
#11 Guest_Seiba_*
Posted 15 February 2008 - 12:05 PM
Doing a test with many special characters didn't solve the problem.Yes! Very interested to hear if you can get it to work...
Maybe using icons of Dlls is not implemented in Add_Shortcut.
Manfred
#12
Posted 15 February 2008 - 12:45 PM
Doing a test with many special characters didn't solve the problem.
Maybe using icons of Dlls is not implemented in Add_Shortcut.
Manfred
I don't know the answer either, but maybe Pedrole15 or Galapo might know better since they were working directly on the latest API version and might even consider adding this as option in the future.
#13
Posted 15 February 2008 - 12:49 PM
#14
Posted 15 February 2008 - 08:29 PM
normaly .exe or .ico but there no test on it, so other can work
Icon index is set to 0
in VistaPE should work same
#15
Posted 19 February 2008 - 01:07 PM
I think that under VistaPE current API do not support shortcuts with DLL icon pointing.How do I specify the position in the Dll of the icon?
If true in order to workaround the issue you can extract the icon from the dll, copy it in related folder and set the related new path in your shortcut line...
Or you can create a real shortcut (with your preferred icon pointing) and add it in your script in order to extract itself in the right place...
#16
Posted 19 February 2008 - 07:18 PM
Thanks Online, i will do this.I think that under VistaPE current API do not support shortcuts with DLL icon pointing.
If true in order to workaround the issue you can extract the icon from the dll, copy it in related folder and set the related new path in your shortcut line...
Or you can create a real shortcut (with your preferred icon pointing) and add it in your script in order to extract itself in the right place...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users