Atitit.创建快捷方式 windows快捷方式的原理
1. Windows中有2种快捷方式的文件:1
2. Jshortcut2
2.1. 提示新不上jshortcut.dll2
2.2. 使用win api实现3
2.3. 使用WshShell com实现3
2.4. Win没提供cli格式的方法3
3. 4
4. Attilax的总结4
5. Ref4
6. Winapi code4
7. --end6
1. Windows中有2种快捷方式的文件:
1、快捷方式文件是二进制文件;
2、Internet快捷方式文件,格式和INI文件一样,扩展名为 .URL。
作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
在此学习一下Internet快捷方式文件。
Internet快捷方式的文件格式如下:
[DEFAULT]
BASEURL=
[InternetShortcut]
URL=
WorkingDirectory=
ShowCommand=
IconIndex=
IconFile=
Modified=
HotKey=
其中
· BASEURL、URL和WorkingDirectory这3项的含义是不言而明的。
· ShowCommand规定Internet Explorer启动后窗口的初始状态:7表示最小化,3表示最大化;如果没有ShowCommand这一项的话则表示正常大小。
· IconFile和IconIndex用来为Internet快捷方式指定图标;如果你不想指定图标,Windows会使用缺省的Internet快捷方式图标。
· HotKey指定一个整数值;HotKey的值及其含义见附录。
2. Jshortcut
JShortcut?-?A?Java?Native?Interface?(JNI)?to?…
翻译此页
This page contains information, documentation, and downloads for JShortcut. JShortcut isa Java package with a native library that allows a Java application to create ...
GitHub - jimmc jshortcut Java JNI interface to access Windows shortcuts.htm
http://alumnus.caltech.edu/~jimmc/jshortcut/download/index.html
Jim McBeathhttp://www.alumni.caltech.edu/~jimmc
2.1. 提示新不上jshortcut.dll
Bg na feodg jshortcut.jar yda d dir hto...zo ok le ..
Se,yeu tips 31bit d ,mafe ....give up..le..
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\workspace 空格\AtiPlatf\WEB-INF\lib_dll\jshortcut.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at net.jimmc.jshortcut.JShellLink.<clinit>(JShellLink.java:100)
at com.attilax.util.ShortCut.createShortCut(ShortCut.java:31)
at com.attilax.util.ShortCut.main(ShortCut.java:17)
2.2. 使用win api实现
用指定的类标识符创建一个Com对象,用指定的类标识符创建一个未初始化的对象。当在本机中只创建一个对象时,可以调用CoCreateInstance;在远程系统中创建一个对象时,可以调用CoCreateInstanceEx;创建多个同一CLSID的对象时, 可以参考CoGetClassObject 函数。
2.3. 使用WshShell &nbs