Sign in to follow this  
Followers 0
stev379

FileInstall

6 posts in this topic

Why would this fail when compiled? It works as .au3.

The compiled file size definitely includes the installed file (netdom.exe).

FileInstall "D:\BACKUP\_Scripts\AutoIT\InProgress\Netdom\netdom.exe", "C:\Windows\System32")

Msgbox(0, "Test", "Check C:\Windows\System32 for netdom.exe") :lmao:

Share this post


Link to post
Share on other sites



Stev379,

One thing I see is your missing the opening quote in the first line. I assume this is just a typo. Also, you must specify the name of the file in the destination path and not just the path itself. See if the code below works for you, in addition to adding the name I used the macro for the system directory to insure that it works on more OS's (and with 'non-standard' OS installs where someone may have changed the default Windows folder name).

FileInstall ("D:\BACKUP\_Scripts\AutoIT\InProgress\Netdom\netdom.exe", @SystemDir & "\Netdom.exe",1)
Msgbox(0, "Test", "Check C:\Windows\System32 for netdom.exe")

Let me know if that works for you, I tested it and it worked for me.

ZK

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Um... I hope that is the exact code.

Your code...

FileInstall "D:\BACKUP\_Scripts\AutoIT\InProgress\Netdom\netdom.exe", "C:\Windows\System32")

New code... look at the green.

FileInstall ("D:\BACKUP\_Scripts\AutoIT\InProgress\Netdom\netdom.exe", "C:\Windows\System32\netdom.exe")

Hope this helps,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Ow...my pride.

Of course it works now. You both had the right idea. I just didn't read the help file closely enough to add the filename at the end.

Thanks for the assist!! :lmao:

Share this post


Link to post
Share on other sites

The file name does not have to be present. However, if it is not, then there must be a trailing slash to inform that it's a directory and not a file. You were trying to install to a file named "System32" which already exists as a directory. Add a "\" to the end of the destination would of correctly installed the file with the source name to the proper location.

Share this post


Link to post
Share on other sites

You are so right!

I know this from other languages. My pride weakens by the hour today. :">

Oh well,

to error is human

to forgive err.clear

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