constants


Inno Setup “All Users” Constant


What is the "All Users" constant? I would need to create some shortcuts in this directory:
"C:\Users\All Users\Microsoft\Windows\GameExplorer"
Could someone help me?
You are supposed to use the appropriate API calls to do that. See the Using DLLs help topic to see how to call APIs from within Inno's [Code].
There is no special constant in inno setup for All users folder, the {group} and some contants refer to all users profiles but not the all users folder, so you can use this below method to fulfill your needs.
[Tasks]
Name: "Myicon"; Description: "Create an icon in Games explorer"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Icons]
Name: "{%ABCDEFA|C:\Users\All Users\Microsoft\Windows\GameExplorer}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" ; Tasks:Myicon
Add these lines to your script.this will create icon in "C:\Users\All Users\Microsoft\Windows\GameExplorer" place .. you can create icons where ever you want.
This can be done with the help of one of the other Constants of inno setup
{%NAME|DefaultValue} Embeds the value of an environment variable.
•NAME specifies the name of the environment variable to use.
•DefaultValue determines the string to embed if the specified variable does not exist on the user's system. •If you wish to include a comma, vertical bar ("|"), or closing brace ("}") inside the constant, you must escape it via "%-encoding." Replace the character with a "%" character, followed by its two-digit hex code. A comma is "%2c", a vertical bar is "%7c", and a closing brace is "%7d". If you want to include an actual "%" character, use "%25".
•NAME and DefaultValue may include constants. Note that you do not need to escape the closing brace of a constant as described above; that is only necessary when the closing brace is used elsewhere.
Examples:
{%COMSPEC}
{%PROMPT|$P$G}
if want you can use this simple test script.I was tested this and working fine for me.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E17175FC-0DF4-4B56-B50D-40D83EA8E19E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "Myicon"; Description: "Create an icon in Games explorer"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{%ABCDEFA|C:\Users\All Users\Microsoft\Windows\GameExplorer}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" ; Tasks:Myicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

Related Links

How do I discover the lowest negative possible CGFloat?
Evaluate Irrational with Julia
Why do we put integer values in Constant class in Java/Android?
What is the difference between “const” and “val”?
Global constants in Dragon NaturallySpeaking's advanced scripting
What are the “hidden constants”?
Are there a constants in scapy for TCP and UDP?
Where can I find a list of constants for Request Transaction Types for Authorize.Net's API?
When we will consider the constants in asymptotic notations?
Why does Pybrain predict always the same value ?
How can I set a constant in autoconf checking for a program?
Error: <signal> is not a constant
What is the write constant [duplicate]
can a constant pointer be changed during for iterations?
What is the value of ABAP constants with prefix “%_”?
introducing constants in solve function

Categories

HOME
visual-studio-2015
dotnetrdf
vue.js
security
ember.js
command
parse-server
windows-store-apps
angular2-directives
codeeffects
rocketmq
apple-numbers
laravel-4
i2c
netflix-feign
dropbear
powershell-v3.0
data-synchronization
data-analysis
sendkeys
sql-tuning
grub2
ms-access-2007
primes
multicore
avplayeritem
onsen-ui
croppic
visual-c++-2017
lync-2013
ab-initio
thinking-sphinx
ivy
roundcube
m2e
freebase
mapguide
superpowered
remote-server
color-scheme
ksoap
mms
android-download-manager
topic-modeling
fax
soundjs
g1gc
taglib
automator
jtds
data-integration
walmart-electrode
production-environment
pinvoke
maintenance
struts-layout
modelattribute
gce
infinite-scroll
objloader
android-navigationview
tomee
glkit
chessboard.js
git-annex
database-backups
spring-lemon
search-regex
proxygen
twgl.js
hyperthreading
matcaffe
p-np
oai
twython
connection-reset
prezto
pyopengl
crash-dumps
criteria-api
ibm-data-studio
google-earth-plugin
alphablending
formvalidation-plugin
alertifyjs
phpdocx
sgml
internal
fogbugz-api
.net-cf-3.5
sql-server-2012-web
gridworld
apache2.2
mstsc
osi
qsqltablemodel
caliper
shared-objects
qtembedded
opengl-es-lighting
authenticode
associative
audiostreamer
querypath
oggvorbis
visual-studio-2010-beta-2
castle-validators
visual-studio-dbpro

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App