hcI

[Solved] autorun on USB key ?

11 posts in this topic

#1 ·  Posted (edited)

Hi everyone !

I'm repearing some PC in my city and I would like to know if there a way to make my AutoIt .exe run automatically when I plug my USB stick in the PC...

I heard about Autorun.inf with the following code inside :

[AutoRun]
shellexecute=program.exe

but it don't work except Windows telling me to analyze the key when I plug it..

And please, administrator/moderator, don't remove my post this is not a troll topic.

If someone have an answer to my question.

Edited by hcI

Share this post


Link to post
Share on other sites



#2 ·  Posted

4 minutes ago, hcI said:

And please, administrator/moderator, don't remove my post this is not a troll topic.

Why would you make this statement?

5 minutes ago, hcI said:

but it don't work except Windows telling me to analyze the key when I plug it..

What is the exact message you get when plugging it in?

PS: In general USB settings are such that you don't want to autoexecute any program anymore these days with the risk of getting infected by a virus when plugging in a USB thumbdrive.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted

@hcI this may not be a "troll topic", but it has been asked and answered numerous times (you would see this if you used that nifty forum search function). In essence, the AutoRun function is disabled by default in newer Windows Operating Systems. You would have to enable the function first, before you can use it.

http://www.thewindowsclub.com/set-autoplay-defaults-windows-10

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#4 ·  Posted

6 minutes ago, Jos said:
25 minutes ago, hcI said:

And please, administrator/moderator, don't remove my post this is not a troll topic.

Why would you make this statement?

18 minutes ago, JLogan3o13 said:

@hcI this may not be a "troll topic"

Because last time a I really had a question about a program (can't remember what it was exactly) and the topic were closed because the admin said "troll topics are not allowed on this AutoIt forum" but it wasn't one !

8 minutes ago, Jos said:

What is the exact message you get when plugging it in?

Hum.. I'm french so the message is in french but it says something like

"Would you like to analyse the USB key and repear it ?" and i have to choose between "Analyse and repear" or "Don't analyse (not recommended)"

14 minutes ago, JLogan3o13 said:

it has been asked and answered numerous times

Oh sorry i searched on internet but the only topic that i got was 3~5 years old so i thinked that Windows made maybe a patch/update about that..

17 minutes ago, Jos said:

In general USB settings are such that you don't want to autoexecute any program anymore these days with the risk of getting infected by a virus when plugging in a USB thumbdrive.

16 minutes ago, JLogan3o13 said:

In essence, the AutoRun function is disabled by default in newer Windows Operating Systems.

Okay. thanks anyway for your answers i'll keep looking for another way.

-hcI

Share this post


Link to post
Share on other sites

#5 ·  Posted

39 minutes ago, hcI said:

Because last time a I really had a question about a program (can't remember what it was exactly) and the topic were closed because the admin said "troll topics are not allowed on this AutoIt forum" but it wasn't one !

Bullshit! This is what you typed and that clearly isn't something serious:

Quote

Hello everyone !

Me and my friend, send challenges to each others.

And they asked me to do a little code that set randomly the opacity of the first window in WinLis

so..  stop crying as you can't complain about the support you have received so far from us.
(As I told you in the past: I am Dutch and we tend not to beat around the bush!)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted

hcI,

When I locked your thread to which Jos refers above, I did not say:

Quote

troll topics are not allowed on this AutoIt forum

but:

Quote

We do not support "spoof" or joke scripts

which your request most certainly was. An apology might be in order......

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Okay Okay, I really apologize. I just.. didn't explained very well and that's how I took it at the moment and couldn't remember exactly what was the exact sentence.

But know that just, without this challenge that I receveid from my friends, i still like to learn about programming, so closing my topic because it isn't a serious problem.. hum.. i don't ask you to, but you could help, spoof or not, (i think) it's intrusting to learn to people who don't have the knowledge that you have...

I apologize again.

 

Edited by hcI

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I hear that excuse so often: "Even if it is against your rules, you should encourage someone trying to learn to script". Such a crock; if you're insistent on using a language for something that will hurt its reputation, the community that supports that language is generally better off without you. That goes for any language, not just AutoIt.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#9 ·  Posted

hcl,

Apology accepted - thank you. But I am entirely in agreement with the sentiments expressed by JLogan3o13 above: our forum, our rules and we will enforce them.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

8 minutes ago, JLogan3o13 said:

I hear that excuse so often: "Even if it is against your rules, you should encourage someone trying to learn to script".

Encourage is not the exact word, but i understand anyway.

5 minutes ago, Melba23 said:

our forum, our rules and we will enforce them.

Yes, I know and like you probably know, a lot of people don't read the full rules (now i feel targeted and it's my fault), and it's by making mistakes that we learn.

I'm sorry and don't want to set anyone in trouble or annoy you, @Jos, @JLogan3o13, @Melba23.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now