Jump to content

FileInstall


 Share

Recommended Posts

I wrote an application, which works great as a script, but once compiled, it seems to not have those files I used with FileInstall. I cant seem to find any reason for this in the help file.

Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein
Link to comment
Share on other sites

What include the variable $TemporyDirectory?

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

you code of line look like this one or not

$TemporyDirectory = "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\MyProgramsTemporaryDirectory\"

but I rather use

$TemporyDirectory = @UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory\"

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

you code of line look like this one or not

$TemporyDirectory = "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\MyProgramsTemporaryDirectory\"

but I rather use

$TemporyDirectory = @UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory\"

Don't you also need the FULL path of the file to install?
Link to comment
Share on other sites

I was showing you the location of the directory. It wasnt ment to be programatically correct.

@UserProfileDir Changes nothing.

You haven't show any peice of code and with the little of information you give I assume you didn't use &. The other suggestion that I can offer is are you sure inside the temp folder MyProgramsTemporaryDirectory folder already exists if not you have to create the folder before the fileinstall.
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Well, I've tested to see if it creates the directory if its not there. Using C:\MyProgramsTemporaryDirectory, I see that it does create the directory if it is not there. However, it will not put any files in it. FileInstall Seems only to function with C:\ why my script is compiled.

I have to disagree with you. I just ran the code below without creating the folder, FileInstall() didn't create a folder instead create a file without ext called MyProgramsTemporaryDirectory inside Temp folder in other hand if I create MyProgramsTemporaryDirectory folder before running the script it work.

$TemporyDirectory = @UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory\"
FileInstall('C:\Test.exe', $TemporyDirectory)
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

  • Moderators

You must always create the directory or it must exist for FileInstall to work correctly period.

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

  • Moderators

[it] meaning my program, not the FileInstall function itself. Sorry for the mis-understanding. The original problem still stands.

Why would it still stand?

If Not FileExists(@UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory") Then DirCreate(@UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory")
FileInstall("Path To Whatever", @UserProfileDir & "\Local Settings\Temp\MyProgramsTemporaryDirectory\", 1)

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

what do you mean "What do you mean it still stands?" ... it still doesnt work, no ones suggested anything to resolve it, or that has resolvedit. Therefore, the error doesnt magically go away. :whistle:

Stands as in do you still have the issue using SmOke_N's code?

Honestly, your closed method of thinking with using non existent code as a clear example of usage makes me think of what issue as it seems to be none as for what you have shown. If you are doing something wrong behind the scenes then it is not evident so far in this thread. Please do not waste time as the others and myself do not have some kind of issue that you seem to suffer from.

Edited by MHz
Link to comment
Share on other sites

IT IS AS SIMPLE AS INSTALLFILE(ANYTHING, ANYWHERE (accept for C:\) ); THAT IS IT. IT DOES NOT WORK.

That is your problem of a closed mind. It is not simple for you to comprehend the operation so you go nuts because you supply nothing concrete as in code to try to help you with.

If you want to behave like a moron then do us a favor and stop wasting time. If you want help then listen to what anyone trying to help you is saying.

Link to comment
Share on other sites

  • Moderators

Obviously I don't expect you to trust me.

The decompile password is 12345.

http://www.autoitscript.com/fileman/users/SmOke_N/FileInstall.Example.rar

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

  • Moderators

It... is... but... just to make sure we have absolute black and white. Put the script and the file in the same directory, right click on hte au3, and click on compile right?

I can't make that black and white for you... I've never used the right click method :whistle: .

But if you ever choose to admit that obviously something is wrong in your real code if you feel you are doing everything right... just decompile the exe I provided so you can see how I used the option... then... run the exe I sent you. That's about as black and white as I can make it for you.

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

Func ITELNOTELWORKELO( $Dir = "C:\It\El\Not\El\Work\El\O")

DirCreate($Dir)

FileInstall("ITELNOTELWORKELO.txt", $Dir);

EndFunc

You are missing the trailing backslash needed.

Func ITELNOTELWORKELO( $Dir = "C:\It\El\Not\El\Work\El\O\")

DirCreate($Dir)

FileInstall("ITELNOTELWORKELO.txt", $Dir);

EndFunc

The destination path of the file with trailing backslash if only the directory is used. This can be a variable.

Link to comment
Share on other sites

  • Moderators

MHZ FTW!!!

Now the real question. Why does the script function perfectly fine, and the compiled version falters?

When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).

Files maintain their original creation/modification timestamps when installed.

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

MHZ FTW!!!

Now the real question. Why does the script function perfectly fine, and the compiled version falters?

It works with the backslash added as mentioned in my last reply.

As stated before, if you want help, then listen. Problem solved.

Link to comment
Share on other sites

  • Moderators

Dude, there is nothing to admit. Stop trying to act all high and mightly and get your head out of the clouds. Take the example I gave you. Both items in the same directory. Run it as a script. Works Perfectly. Compile it. ( Be sure to delete the prevoiusly created file) Does'nt work. Clear as that. I've tested it on a friends computer aswell. Same thing happens.

I'm just getting exceedingly tired of repeating myself. Not a hard concept boys and girls.

Are you kidding?

My head isn't in the clouds.

Do you see one example without the trailing backslash that anyone gave?

Danny35's:

http://www.autoitscript.com/forum/index.ph...st&p=309762

http://www.autoitscript.com/forum/index.ph...st&p=309785

Mine:

http://www.autoitscript.com/forum/index.ph...st&p=309820

Yet you chose to bad mouth and insist that we were doing something wrong, and there was absolutely no need to post your code.

Of course I think it's kind of funny you calling me arrogant, when the answer was always in front of you, but you obviously made no attempt to use any of the "real" code either of us provided.

You've always been an ass though... no harm no foul.

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

QUOTE(Help)

When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).

Files maintain their original creation/modification timestamps when installed.

ahhh-hah. Well, I apologize for not provinding an example sooner. I was certain that it was not code related due to the fact that everything functioned perfectly fine in the script.

Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein
Link to comment
Share on other sites

You've always been an ass though... no harm no foul.

Yeah, you are arrogant. Anyways, im not getting into an emo arguement with you. Judgeing from your lifeless 9000 posts, you have the time to waste here, as I do not. Chow. Edited by Excalibur
Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein
Link to comment
Share on other sites

  • Moderators

Yeah, you are arrogant. Anyways, im not getting into an emo arguement with you. Judgeing from your lifeless 9000 posts, you have the time to waste here, as I do not. Chow.

Arrogance portrays ignorance... I'm not arrogant by any means... just confident in what I know... and now we all know a bit about you :whistle: ... Chow :)

P.S.

Those 9000 lifeless posts are what helps the deserving and people like you :lol:.

Edited by SmOke_N

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

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...