Jump to content

Prohibit Aut2Exe overwriting install exes


peethebee
 Share

Recommended Posts

Hi!

I read so often in forums that people name their script like the program they wanna install. For example firefox.au3 and firefox.exe. If the au3 is compiled, it silently replaces the firefox.exe. Now the Run("firefox.exe") line results in a infinite loop running the script itself ever and ever again.

This could be prohibited very easily with a little additional check in the aut2exe.exe. It would have to check wether the destination path is an AutoIt script or not. If it is, everything is okay and handled as now. If not, there should be a little MsgBox telling about the problem. I think that shouldn't be too hard to implement.

Would be great if this little thing could be done as it would probably preserve many noobs from this type of error.

Thanks for your attention,

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

  • Moderators

Hi!

I read so often in forums that people name their script like the program they wanna install. For example firefox.au3 and firefox.exe. If the au3 is compiled, it silently replaces the firefox.exe. Now the Run("firefox.exe") line results in a infinite loop running the script itself ever and ever again.

This could be prohibited very easily with a little additional check in the aut2exe.exe. It would have to check wether the destination path is an AutoIt script or not. If it is, everything is okay and handled as now. If not, there should be a little MsgBox telling about the problem. I think that shouldn't be too hard to implement.

Would be great if this little thing could be done as it would probably preserve many noobs from this type of error.

Thanks for your attention,

peethebee

I don't like this idea at all, not everyone makes their .exe's in conformity.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I don't get your point, Smoke_N. Could you tell me a case in which it would cause additional trouble for you?

I could not think of one, but of the positive effect explained above. But there could be negative ones too of course - I just do not know one by now.

Thanks!

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

Personally I've never had that problem. If I'm writing a script for say Norton then my script would Install_Norton.au3 etc....

Seems like common sense to me to make sure it doesn't have the same name as to the application your trying to script.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

  • Moderators

I don't get your point, Smoke_N. Could you tell me a case in which it would cause additional trouble for you?

I could not think of one, but of the positive effect explained above. But there could be negative ones too of course - I just do not know one by now.

Thanks!

peethebee

Well,

1. I learned a long time ago, not to name something the same name as another executable the hard way. It only took once, and I've never done it since.

2. I don't write my executables as stated above to conformity because of all the virus tags that the script kiddies have so modestly provided for us. So by some slim chance, what if it doesn't recognize my app as being an autoit script, does that mean it won't launch it?

3. I don't want the extra milliseconds delay in checking something like that, when it can easily be solved by the developer themselves, and checking their environment before launching if they feel it may be an issue.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

People Will keep on shooting themselves in their foot what ever we do.

I do not believe in testing for these type of human errors because there would be a heck of a lot of tests we need it perform.

;)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi!

I know all your points and being a developer myself, I can fully understand them. But I watch out many German forums too and have one myself. So as I supporter I see that this case is incredibly common. That's why I thought it would be an easy solution to keep people aware of those problems.

I repect your points, but keep in mind: "Often the small things are the things that make the difference!" ;-)

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

There's another very simple fix: Always use _Singleton() unless you have a reason not to use it. The Run("Firefox.exe") line in that case will start up a second instance of the script which will immediately terminate. It's still confusing the first time it happens but at least it prevents the spawning process.

Link to comment
Share on other sites

Yeah - there are many easy fixes starting from just renaming the au3 thus and the resulting exe file.

But many newbies can not figure that out themselves which is *quite* understandable as there is not a very obvious source for the error... (nobody has changed the exe file willingly)

peethebee

Edited by peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

  • Moderators

Yeah - there are many easy fixes starting from just renaming the au3 thus and the resulting exe file.

But many newbies can not figure that out themselves which is *quite* understandable as there is not a very obvious source for the error... (nobody has changed the exe file willingly)

peethebee

So your willing to compromise the integrity of current users scripts/executables for the benefit of a noobs understanding on why their app is not operating correctly when there are many "easy" fixes already currently available?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hi!

@SmOke_N:

You did not get my point. But it doesn't matter as I see no will to implement it. Just let it that way - I'll explin my noobs why it is that way ;-)

Thanks,

peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Link to comment
Share on other sites

@peebee: Simple solution. If this issue is so important for you, write a wrapper for Aut2Exe.exe. Aut2Exe.exe supports commandline parameters Aut2Exe.exe /?, so you can call the real Aut2Exe.exe.

Things to do

  • Rename Aut2Exe.exe to Pro_Aut2Exe.exe
  • Create Noob_Aut2Exe.exe. Simulate the GUI and commandline options of Pro_Aut2Exe.exe
  • Within Noob_Aut2Exe.exe, check whatever you want to check, then call Pro_Aut2Exe.exe
  • Create a link Aut2Exe.exe -> Noob_Aut2Exe.exe (otherwise Scite won't work anymore)
  • Create an Installer for Noon_Aut2Exe.exe as your noobs will not be able to rename Aut2Exe.exe!
Basically that's it. Estimated time: a few hours....

Anyway, I don't understand the whole problem. If a noob does what you describe, he will do it only once. AND, Aut2Exe will have to check EVERY Run() statement to see if the noob is going to shot himself in the knee. Ways to much work to eliminate just one way for noob to do something stupid. What's next. Check every FileRemove() command to prevent a noob from deleting boot.ini???

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...