[izpack-changes] r1496 - izpack-src/trunk/src/lib/com/izforge/izpack/util/os
noreply at berlios.de
noreply at berlios.de
Sat Jul 22 20:47:38 CEST 2006
Author: eppelman
Date: 2006-07-22 20:47:32 +0200 (Sat, 22 Jul 2006)
New Revision: 1496
Modified:
izpack-src/trunk/src/lib/com/izforge/izpack/util/os/Win_Shortcut.java
Log:
Fixed Win32Admin ShortCut Creation.
Here: added mapping between win32 ShellLink and ShortCut Class. (maybe needs refactoring)
Modified: izpack-src/trunk/src/lib/com/izforge/izpack/util/os/Win_Shortcut.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/util/os/Win_Shortcut.java 2006-07-22 09:03:10 UTC (rev 1495)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/util/os/Win_Shortcut.java 2006-07-22 18:47:32 UTC (rev 1496)
@@ -642,10 +642,19 @@
*/
public String getProgramsFolder(int current_user)
{
+ /** CURRENT_USER = 0; the constant to use for selecting the current user. */
+ int USER = 0;
+
+ if( current_user == Shortcut.CURRENT_USER )
+ USER = ShellLink.CURRENT_USER;
+
+ else if( current_user == Shortcut.ALL_USERS )
+ USER = ShellLink.ALL_USERS;
+
String result = null;
try
{
- result = new String( shortcut.getLinkPath(current_user).getBytes( StringTool.getPlatformEncoding() ), StringTool.getPlatformEncoding() );
+ result = new String( shortcut.getLinkPath(USER).getBytes( StringTool.getPlatformEncoding() ), StringTool.getPlatformEncoding() );
}
catch (UnsupportedEncodingException e)
{
More information about the izpack-changes
mailing list