Shortcuts on International Versions

  • Thread starter Thread starter Drew
  • Start date Start date
D

Drew

Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results of :

#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder = @s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\") +
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would be the
others.
 
Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew
 
The result of s_ExeFolder would have that language specific name that you
want.
Example : if I start my Project from VS it is installed in "\Program Files\"
and not in "Programme"
sbStatusBar.Text =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
shows :
"\Program Files\NetDbBrowser\NetDbBrowser.exe"

If I copy the Directory to "Programme" as the install program would do :
"\Programme\NetDbBrowser\NetDbBrowser.exe"
is the result.
In Spanish there would be the Spanish Version of "Program Files".

This is what you want as far as I understood.

Mark Johnson, Berlin Germany
(e-mail address removed)
 
OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



Alex Feinman said:
How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Drew said:
Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew
 
Definitely no quotes inside the path. AFAIK no quotes are required around
the path either

Drew said:
OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Drew said:
Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results
of
:
#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder =
@s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\")
+
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
Wait - this doens't work.

You can't put these CE Strings inside a shortcut. (please correct me if I'm wrong)
My device running Pocket PC 2002 doesnt seem to recognize the path.

BTW, the shortcut is installing to the correct location, it's just the path
inside the shortcut that is incorrect because of the language version.

Drew


Drew said:
OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



Alex Feinman said:
How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Drew said:
Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results of :

#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder = @s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\") +
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
Sorry, you are correct. But you can refer to the installation directory and
other directories specified in the [InstallationDirs] section:
http://msdn.microsoft.com/library/d...y/en-us/wcesetup/htm/_wcesdk_CEShortcuts.asp?
http://msdn.microsoft.com/library/d...n-us/wcesetup/htm/_wcesdk_destinationdirs.asp

And the InstallDir specification can use the %CEXX% strings

Drew said:
Wait - this doens't work.

You can't put these CE Strings inside a shortcut. (please correct me if I'm wrong)
My device running Pocket PC 2002 doesnt seem to recognize the path.

BTW, the shortcut is installing to the correct location, it's just the path
inside the shortcut that is incorrect because of the language version.

Drew


OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results of
:

#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder = @s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\")
+
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
Still confused about this whole issue.

Will this actually create the shortcut with the correct
path inside (depending on language) or do I still have
to create the shortcut manually prior running cabwiz?

If the latter, then I'm back at square one.

Drew



Alex Feinman said:
Sorry, you are correct. But you can refer to the installation directory and
other directories specified in the [InstallationDirs] section:
http://msdn.microsoft.com/library/d...y/en-us/wcesetup/htm/_wcesdk_CEShortcuts.asp?
http://msdn.microsoft.com/library/d...n-us/wcesetup/htm/_wcesdk_destinationdirs.asp

And the InstallDir specification can use the %CEXX% strings

Drew said:
Wait - this doens't work.

You can't put these CE Strings inside a shortcut. (please correct me if I'm wrong)
My device running Pocket PC 2002 doesnt seem to recognize the path.

BTW, the shortcut is installing to the correct location, it's just the path
inside the shortcut that is incorrect because of the language version.

Drew


OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results of
:

#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder = @s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\")
+
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
If you use %InstallDir% in the shortcut specification, it will use the
actual installation directory - with localized name

[Shortcuts]
Sample App,0,sample.exe,%InstallDir% ; The path is explicitly specified.

Drew said:
Still confused about this whole issue.

Will this actually create the shortcut with the correct
path inside (depending on language) or do I still have
to create the shortcut manually prior running cabwiz?

If the latter, then I'm back at square one.

Drew



Sorry, you are correct. But you can refer to the installation directory and
other directories specified in the [InstallationDirs] section:
http://msdn.microsoft.com/library/d...y/en-us/wcesetup/htm/_wcesdk_CEShortcuts.asp?
http://msdn.microsoft.com/library/d...n-us/wcesetup/htm/_wcesdk_destinationdirs.asp

And the InstallDir specification can use the %CEXX% strings

Drew said:
Wait - this doens't work.

You can't put these CE Strings inside a shortcut. (please correct me
if
I'm wrong)
My device running Pocket PC 2002 doesnt seem to recognize the path.

BTW, the shortcut is installing to the correct location, it's just the path
inside the shortcut that is incorrect because of the language version.

Drew


OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In that case
you should use standard windows CE shortcuts:
http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp
In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the results of
:

#if (COMPACT)
s_ExeFolder =
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder = @s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\")
+
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" , "sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu"
would
be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
OK, now we're back in business. :)

Previously, I was creating my own .lnk with an absolute path,
which was causing the problem. I hope this works now for
our friends in Germany.

Thanks,

Drew


Alex Feinman said:
If you use %InstallDir% in the shortcut specification, it will use the
actual installation directory - with localized name

[Shortcuts]
Sample App,0,sample.exe,%InstallDir% ; The path is explicitly specified.

Drew said:
Still confused about this whole issue.

Will this actually create the shortcut with the correct
path inside (depending on language) or do I still have
to create the shortcut manually prior running cabwiz?

If the latter, then I'm back at square one.

Drew



Sorry, you are correct. But you can refer to the installation directory and
other directories specified in the [InstallationDirs] section:
http://msdn.microsoft.com/library/d...y/en-us/wcesetup/htm/_wcesdk_CEShortcuts.asp?
http://msdn.microsoft.com/library/d...n-us/wcesetup/htm/_wcesdk_destinationdirs.asp

And the InstallDir specification can use the %CEXX% strings

Wait - this doens't work.

You can't put these CE Strings inside a shortcut. (please correct me if
I'm wrong)
My device running Pocket PC 2002 doesnt seem to recognize the path.

BTW, the shortcut is installing to the correct location, it's just the
path
inside the shortcut that is incorrect because of the language version.

Drew


OK, maybe that's my problem.

I've got the path hardcoded in the shortcuts. I didn't
realize that you could use those identifiers inside the
shortcut as well as in the .inf file.

BTW, are the quotes around the identifier required?
(the link to the SDK shows quotes)

%CE1%\MyApp\MyApp.exe

or

"%CE1%"\MyApp\MyApp.exe

Thanks,

Drew



How are you creating the shortcut?
Supposedly you are using a cab file to install the application. In
that case
you should use standard windows CE shortcuts:

http://msdn.microsoft.com/library/d...mo_ppc/htm/amo_pocket_pc_ce_strings__pchy.asp

In the .inf file specify
[Shortcuts]
My App,0,MyApp.exe,%CE11%


Hmm...I'm not really sure that this is the issue that I'm having.

I just want my shortcut to point to my program regardless of
what language version (German, Spanish, etc) the person is using.

The program itself launches if they use the File Explorer to click
on the actual .exe, it's just the path *inside* the shortcut that is
wrong because of the language version.

If I install to the root directory then I wouldn't have this problem
but that doesn't seem like a good solution.

Drew


sbStatusBar.Text =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- does not work on Compact.
InstallDir "$PROGRAMFILES\mj10777.de.eu\Surrogat"
in the Setup.nsi does work correctly.

If you are using this in the .EXE you will have to parse the
results of
:

#if (COMPACT)
s_ExeFolder =

System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
#else
s_ExeFolder = System.IO.Directory.GetCurrentDirectory();
#endif
s_ExeFolder =
@s_ExeFolder.Substring(0,s_ExeFolder.LastIndexOf("\\")
+
1);

s_ExeFolder = "Programme\\mj10777.de.eu\\MainFrame\\"

"My Documents" is by the way (at least in German) the same.

Hope this helps

Mark Johnson, Berlin Germany
(e-mail address removed)

BTW what is "Mein Gerät" or "Speicherkarte" ("My Machine" ,
"sd-Card")
"Schriftarten" for "Fonts" and "StartMenü" for "Start Menu" would
be the
others.


Hi,

I ran into a bit of a problem when someone tried to install my
program on their German version of PocketPC using CF.

The shortcut I had for my program didn't work because I had
hardcoded it via \Program Files\MyApp\MyApp.exe but
on their device it should have been \Programme\MyApp\MyApp.exe

What is the best way to handle this?

Thanks,

Drew
 
Back
Top