Hi everyone,
I used to create shortcuts with IWshRuntimeLibrary in C#, but now i am trying to create in java, which i couldn't found via googling.
Can anyone show me the shortcut path of wisdom and illumination? :)
Hi everyone,
I used to create shortcuts with IWshRuntimeLibrary in C#, but now i am trying to create in java, which i couldn't found via googling.
Can anyone show me the shortcut path of wisdom and illumination? :)
Jump to PostUse the ProcessBuilder class to run the (free) XXMKLINK program?
Use the ProcessBuilder class to run the (free) XXMKLINK program?
Use the ProcessBuilder class to run the (free) XXMKLINK program?
Thanks James,
Even though, i don't want to use an external executable file to process, i guess this is the best alternative for now (with running in quiet mode "/q")...
Hi everyone,
I used to create shortcuts with IWshRuntimeLibrary in C#, but now i am trying to create in java, which i couldn't found via googling.
Can anyone show me the shortcut path of wisdom and illumination? :)
Please look at http://www.ttechnika.xt.pl/programowanie/67-windows-shortcut-fileslnk-in-java-en.html for working code.
try this
String script = "Set sh = CreateObject(\"WScript.Shell\")"
+ "\nSet shortcut = sh.CreateShortcut(\"D:/temp/Shortcut.lnk\")"
+ "\nshortcut.TargetPath = \"D:/some path to file\""
+ "\nshortcut.Save";
File file = new File("d:/temp/temp.vbs");
FileOutputStream fo = new FileOutputStream(file);
fo.write(script.getBytes());
fo.close();
//Runtime.getRuntime().exec("wscript.exe D:/temp/crear-acceso-directo.vbs");
Runtime.getRuntime().exec("wscript.exe " + file.getAbsolutePath() );
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.