Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

launch java application without double click  RSS feed

 
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,

i have a small application written in swing and packaged into jar. this app is contained in a USB pen/flash drive. What i want is to install or launch this application without any double click when i insert USB drive into another PC(windows).
Is that possible ?
 
Marshal
Posts: 61756
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds hazardous; if somebody wrote malware which could be executed without clicking, think of the damage it could do.
 
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to this article the answer would appear to be No (but you can get close on some versions of Windows).
That was just the first article I found when I googled 'autorun on usb'.
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Adrian Burkett wrote:According to this article the answer would appear to be No (but you can get close on some versions of Windows).
That was just the first article I found when I googled 'autorun on usb'.



that was a mice article. But i wonder whether that will work on USB pen drives also.
by the way thanks
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

naveen yadav wrote:But i wonder whether that will work on USB pen drives also.


Why don't you try it and let us know.
 
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wouldn't work on my computer with pen USB drive. Not even with USB harddisk, nor with CD, nor with DVD. Turning off autorun is on my list of things to do after installing Windows on a computer, right there with "get antivirus" and "install Windows updates". I suspect lots of people do the same.

However, there is no fundamental difference between USB pen drive and any other USB storage device. If the autorun is enabled and the USB pen drive is properly furnished for autorun, it should be run when plugged in.
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'll let you know
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!