public class Shortcut extends Object
| Modifier and Type | Field and Description |
|---|---|
String |
appdata
Refers to ApplicationData folder.
|
String |
arguments
Arguments while invoking the target(if any)
|
String |
description
Description of the shortcut
|
String |
desktop
Refers to %UserProfile%\Desktop
|
String |
HotKey
Set hotkey for shortcut(in String format)
Example : "Ctrl+Alt+F9"
|
String |
iconLocation
Path to icon
|
String |
localAppdata
Refers to LocalApplicationData folder.
|
String |
shortcutPath
Where the shortcut needs to be placed
|
String |
startMenu
Refers to the Users StartMenu Folder
|
String |
target
Path the shortcut should target
|
String |
userProfile
Refers to %UserProfile%
|
int |
windowStyle
WindowStyle (integer value)
|
String |
workingDirectory
Working Directory of the target in the shortcut
|
| Constructor and Description |
|---|
Shortcut()
Create a instance of the Shortcut class to use it
|
Shortcut(File shortcutfile)
Reads a Shortcut from the file provided.(Uses VBS)
|
| Modifier and Type | Method and Description |
|---|---|
void |
createschortcut()
Creates the Shortcut (saves it on the FileSystem)
It uses VBS to create the shortcut
|
void |
getPaths() |
public String target
public String shortcutPath
public int windowStyle
public String iconLocation
public String description
public String workingDirectory
public String localAppdata
public String appdata
public String userProfile
public String desktop
public String startMenu
public String arguments
public String HotKey
public Shortcut()
public Shortcut(File shortcutfile) throws FileNotFoundException, InterruptedException
shortcutfile - Provide the existing shortcut fileFileNotFoundException - If File is not foundInterruptedException - If the creation was unsuccessfullpublic void getPaths()
public void createschortcut()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionCopyright © 2016. All rights reserved.