Jump to content

FileInstall


stev379
 Share

Recommended Posts

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:

Link to comment
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

Link to comment
Share on other sites

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)

Link to comment
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.

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