B4J Question Create Windows Shortcut?

aidymp

Well-Known Member
Licensed User
Longtime User
Hi im looking to create a windows shortcut in code? ideally with custom icon is this possible?

I have seen some posts about it in VB.net but nothing in B4J

Thanks

Aidy
 

aidymp

Well-Known Member
Licensed User
Longtime User
You can create a shortcut as part of the installation.

Creating a shortcut at runtime is more difficult. Seems like it requires a Java library that uses JNI to call the Windows specific APIs.

Does a library like this exist? as my plan is to copy an existing windows application and run it in portable mode, this way the user would have 2 or more versions of the same app, i can make the .bat but a shortcut would be the icing on the cake!

Thanks

Aidy
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Upvote 0

aidymp

Well-Known Member
Licensed User
Longtime User
@DonManfred that would be excellent! in the mean time i will read up on the above links! Thank you everyone above! I have clicked the likes too!

Thanks

Aidy
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
But sadly it does not work as yet... I´m investigating what´s going wrong. Hopefully i can get rid of it
after a couple hours of testing. I got it working. BUT not able to set an icon, not able to set commandline-args, not able to set an description.

So i decided to stop working on it and i did a search by myself and found this.

I downloaded it
did a wraper for it in about 30 minutes. And some hours more to do some documentation, tests, creating the zips...
Did a small example to test.

WORKS :D
 
Upvote 0
Top