Jump to content

Recommended Posts

Hello,

 

I have searched in the web tutorial on "How use AutoIt to portabilize a program" but I haven't found documentation.

May this argument be interesting for someone, or not, i don't know. But I believe is better have more documentation than less...

I would like to try to write a tutorial on my own, but, as you could seen, I'm not able to realize it alone.

I'm searching someone interested to help me with the code and the text revision (my english is so poor).

 

If anyone is disposable to help me, let me know, so we can plan a project.

 

Thanks.

Share this post


Link to post
Share on other sites

@Grof
As you already have stated in many of your topics, what do you exactly mean with "portabilize"?
What's the end goal?
If you're not familiar with AutoIt you should never try to do something that's very hard to do.
You can't climb a ladder yet if you're not able to jump on the first rung :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

For portabilizer I mean a competor of PortableApps, not a rival of WMWare ThinApp.

AutoIt is a script system, so can do this, and not a sandbox.

 

I know the algorithm and most of the code in NSIS language.

The algorithm is very simple, the coding more difficult...

But not so much. Could be about 100 lines or little more.

Share this post


Link to post
Share on other sites
Posted (edited)

what has NSIS got to do with this? it's for making application installers. what is this magic algorithm? like to share it?

first, do you have any idea how to go about making an application installer? because if you don't you won't be able to understand what YOU must do in order to make an application portable.

I guess basically you want to repackage an app in NSIS, but that isn't making it portable. You need to figure out what the app does at install time, then YOU must do it all after you plunk down the fileset to the target pc, register all the necessary files (not to mention install needed prerequisites, drivers, etc...), create shortcuts, registry entries, all that.

if you know about all the stuff that needs to be done, you can then package it with NSIS

autoit is most likely not the tool you are seeking for this job.

watch this. you need a clean system and a way to scan all the changes so you can start to build your portable app.

I use SysTracerPro to take snapshots before and after the initial app install.

http://www.blueproject.ro/systracer/

 

now you have all the data you need in order to repackage as a portable app., 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Posted (edited)

I have checked the basic template I have written in NSIS:

Without empty rows and comments is 57 lines!

(But NSIS is more structured than AutoIt).

 

It's not an impossible job!!!

 

If do you want, I can post it.

Edited by Grof

Share this post


Link to post
Share on other sites

Earthshine, I'm not talking about the tecnique to report the changement in a system, but the tool to make portable an application after have undesrstood how its behaviour.

 

Have you ever tryed Total Uninstall Pro?

Share this post


Link to post
Share on other sites
Posted (edited)

I'm sorry about your idea to be out.

I suppose you are a great programmer...

 

Why don't you try and after decide what you prefer decide?

Could be better than you believe!

Edited by Grof

Share this post


Link to post
Share on other sites

if you want autoit to be what the thin app is, good luck, and get to writing code. asking us to do it isn't going to happen. as for tutorials, there is always Google to search. bye

if you know how to do it, then do it. don't ask others to do your work


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

As you have written to me yesterday, i can say the same to you today...

 

Have you read what I have written???

"For portabilizer I mean a competor of PortableApps, not a rival of WMWare ThinApp".

 

I DON'T wanna create a NSIS wrapper like PortableApps, but many pieces of code that arrange together, like a puzzle, can create a launcher compilable in AutoIt.

 

Following the code I have written in NSIS to portabilize a basi application.

I wanna create a similar template for obtain the same results in AutoIt!

 

 

    WindowIcon Off    
    SilentInstall Silent    
    AutoCloseWindow True        
    RequestExecutionLevel user                                        

*    !define APP         "MyApp"    
*    !define APPEXE         "MyApp"        
*    !define APPNOSPACE     "MyApp"    


    OutFile "..\..\${APP}.exe"    
    Icon "${APPEXE}.ico"    

 

Section "ADDITIONAL"
SectionEnd

 

Section "REGISTRY"

    !include "Registry.nsh"        

*    !define REGISTRYKEY1 "HKEY_CURRENT_USER\Software\MyApp"        
*    !define PORTABLEKEY1 "$EXEDIR\User\MyApp.reg"        

    ${registry::DeleteKey} "${REGISTRYKEY1}-BackupBy${APPNOSPACE}Portable" $R0    
    Sleep 200                    

    ${registry::MoveKey} "${REGISTRYKEY1}" "${REGISTRYKEY1}-BackupBy${APPNOSPACE}Portable" $R0
    Sleep 200                    

    ${registry::RestoreKey} "${PORTABLEKEY1}" $R0    
    Sleep 200                        

SectionEnd

 

Section "APPDATA"

*    !define APPDATADIR1 "$APPDATA\MyApp"                
*    !define PORTABLEDIR1 "$EXEDIR\User\MyApp"    

    RMDir "/r" "${APPDATADIR1}-BackupBy${APPNOSPACE}Portable"        
    Rename "${APPDATADIR1}" "${APPDATADIR1}-BackupBy${APPNOSPACE}Portable"    

    CreateDirectory "${APPDATADIR1}"                
    CopyFiles /SILENT "${PORTABLEDIR1}\*.*" "${APPDATADIR1}"    

SectionEnd

 

Section "LAUNCH"

    ExecWait "$EXEDIR\Bin\${APPEXE}.exe"    

SectionEnd

 

Section "UNMOUNT APPDATA"

    RMDir "/r" "${PORTABLEDIR1}"            
    CreateDirectory "${PORTABLEDIR1}"            
    CopyFiles /SILENT "${APPDATADIR1}\*.*" "${PORTABLEDIR1}"

    RMDir "/r" "${APPDATADIR1}"                
    Rename "${APPDATADIR1}-BackupBy${APPNOSPACE}Portable" "${APPDATADIR1}"    

SectionEnd

 

Section "UNMOUNT REGISTRY"

    Delete "${PORTABLEKEY1}"                    

    ${registry::SaveKey} "${REGISTRYKEY1}" "${PORTABLEKEY1}" "/A=1" $R0    
    Sleep 200                        

    ${registry::DeleteKey} "${REGISTRYKEY1}" $R0        
    Sleep 200                        

    ${registry::MoveKey} "${REGISTRYKEY1}-BackupBy${APPNOSPACE}Portable" "${REGISTRYKEY1}" $R0    
    Sleep 200                            

    ${registry::Unload}                    

SectionEnd

 

Section "UNMOUNT ADDITIONAL"
SectionEnd

 

Section "CLOSE"

    !include nsProcess.nsh                    

    ${nsProcess::KillProcess} "${APPEXE}" $R0    

    ${nsProcess::Unload}        

SectionEnd

 

As you can see these are fiftyseven (57) lines of code!

In the section ADDITIONAL goes the othe pieces of code each time needed.

 

I'm sure you understand the algorithm, it's very simple, and the works require only few days.

(And for you could be more satisfiing than stay here talking to me!). :D

Share this post


Link to post
Share on other sites

so why is it not written and debugged if it's so easy? I have read what you wrote, however, I think the message gets lost in the translation. It doesn't make much sense, I got that you want to do it in autoit. my point is, why are you not doing it if you have your algorithm? what are you waiting for? read the help file and get to coding.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

So you basically want to rewrite NSIS in AutoIt3?

I am still lost what it is you really want to reinvent here and your given explanations haven't made it clear to me yet.....sorry.

Jos

Share this post


Link to post
Share on other sites
Posted (edited)

I know exactly what has to happen to make any app in it's own portable container. That algorithm it isn't. and it doesn't take into account any dependencies or DLLs and TLB registration

reinvent vmWare Thin App, that's what you are talking about. good luck.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

Yes.

I want translate this,and other, code, in this way many user (who don't like or don't know NSIS) have other choice when portabilizing a program.

Each portabilizer (compiler) has some limitation...

ex: YAP cannot write in a file (Is impossible edit Hosts).

PortableApps cannot close an application and open another...

NSIS sometimes fail to backup registry.

 

My goal is not only translate this code but explain what, and how, do this in AutoIt.

If someone like me, want try lo learn AutoIt cannot find a tutorial step by step.

Share this post


Link to post
Share on other sites

Wel...   get started and try to build something you can show as I am pretty sure others won't be doing it for you, but who knows, maybe you find that nishe that people like.

Jos

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, Grof said:

I wanna create an analogue tutorial about AutoIt, And I don't know how to do this without help.

Help with what? You haven't shown anything here yet other than NSIS stuff. Start writing and searching for the appropriate functions and build something yourself.
You obviously can always ask a question here in case you get stuck, but you need to drive this! ;) 

Jos

Edited by Jos

Share this post


Link to post
Share on other sites

You keep saying you want to do this, a very complex task, and yet you are showing you also don't know very much about AutoIt (no judgment, we were all new once). I think the big question everyone is trying to get you to answer is why you're insistent on jumping into this project which is clearly over your head and will require someone with more technical knowledge to basically do the work for you? This isn't a scenario in which you have a framework started and are looking for assistance; by your own admission you have no idea how to start, just what you would like the end product to look like. Does it not seem more of a common sense approach to start more slowly and build your skills with the language until you are ready to undertake such an in-depth program, rather than wanting others to spoon-feed it to you?

Share this post


Link to post
Share on other sites

"You haven't shown anything here".

I know, this idea is came to me today morning.

 

"you are showing you also don't know very much about AutoIt".

True. But as you can can see i wanna learn.

 

"get you to answer is why you're insistent on jumping into this project".

I' was so insistent because I know you, until now, haven't comprehended what I was talking about.

Now I can stop to talk...

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

×
×
  • Create New...