Sign in to follow this  
Followers 0
Toy

Is this possible?

6 posts in this topic

Hello! I wrote a script and i want to use it from any computer.

So first i make a .exe file from the script.

But now my issue. The script needs additional files and i want to put them into the .exe too. So i can use 1 file.

For Example:

When i run the .exe i want it to extract some files to a new to create subfolder of the script.

So when i have the script in C:/ and i execute the exe i want it to make a folder with the name EXTRA and put in the files i want. When the folder already exist it has to do nothing.

Who can help me out with the possibilities and whats the best way of doing this?

Share this post


Link to post
Share on other sites



Try FileInstall

; Include a  bitmap found in "C:\test.bmp" with the compiled program and put it in "D:\mydir\test.bmp" when it is run 
$b = True 
If $b = True Then FileInstall("C:\test.bmp", "D:\mydir\test.bmp")

Share this post


Link to post
Share on other sites

Try FileInstall

; Include a  bitmap found in "C:\test.bmp" with the compiled program and put it in "D:\mydir\test.bmp" when it is run 
$b = True 
If $b = True Then FileInstall("C:\test.bmp", "D:\mydir\test.bmp")

I have seen that in the help file. But what i understand i cannot create a file in @scriptdir.

Share this post


Link to post
Share on other sites

I have seen that in the help file. But what i understand i cannot create a file in @scriptdir.

There is no restriction on the path for the files extracted from the exe, (ignoring UAC) only the source for the files at compile time must be a constant. If you have designed your app to save files to the scriptdir and the script is in Program Files then, well, you shouldn't IMO although you will get away with it in XP.

So for example

DirCreate("@AppDataDir\Squiggle\")

FileInstall("C:\My Documents\Somefolder\File1.abc", @AppDataDir\Squiggle\file1.abc", 1)

is ok


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Thank you! ill get back to work with it :unsure:

Share this post


Link to post
Share on other sites

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.

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
Sign in to follow this  
Followers 0