Moving Files/Dirs with aFileMove

Started by jtrask, July 26, 2013, 09:37:22 AM

Previous topic - Next topic

jtrask

I've got an application that for reasons unknown, installs to C:\Program instead of C:\Program Files (C:\Program Files (x86) in my case).  I want my installation script to copy everything from C:\Program to a directory I've created in C:\Program Files (x86).

When I execute
If aFileMove(vstrBadDir:"\*.*",vstrGoodDir:"\*.*",0) == @TRUE Then

it returns false.

When I manually drag and drop to Program Files (x86) I get notified that it will require elevated permissions to perform this unnatural act. Could this be causing an issue for my script even though it is being executed As Administrator?

jtrask

As I am very dimwitted, it took me half a day to realize that I should try to copy these file to somewhere I knew wouldn't require any special permissions like my temp directory.  Surprisingly, that didn't work so I'm back to the drawing board.

Deana

I currently suspect you are dealing with a UAC issue. Program Files (x86) is a protected directory.  The Program Files (x86) directory is not writeable by default for non-administrator accounts. If you are in fact logged as an administrator, you will need to make sure you are running a properly manifested script. In order to get the full administrative privileges you will need to make sure you script is manifested with a RequestedExecutionLevel of HighestAvailable. For more information about UAC and manifest see the Consolidated WIL help file: using the keywords UAC and Manifests.
Deana F.
Technical Support
Wilson WindowWare Inc.

Deana

Deana F.
Technical Support
Wilson WindowWare Inc.