Toy Posted April 24, 2011 Share Posted April 24, 2011 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? Link to comment Share on other sites More sharing options...
Chimaera Posted April 24, 2011 Share Posted April 24, 2011 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") If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Toy Posted April 24, 2011 Author Share Posted April 24, 2011 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. Link to comment Share on other sites More sharing options...
martin Posted April 24, 2011 Share Posted April 24, 2011 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 exampleDirCreate("@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. Link to comment Share on other sites More sharing options...
Toy Posted April 25, 2011 Author Share Posted April 25, 2011 Thank you! ill get back to work with it Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 25, 2011 Moderators Share Posted April 25, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now