PDA

View Full Version : Copying files to system and system32 directory in windows 7



zeeshan12
11-16-2011, 06:28 AM
Hi,

I have built an installer using installanywhere 2011. One of the requirements is to copy a couple of dll files to system and system32 directory. I have created a batch file to do this and added it as a post installation action.

The batch file runs fine on its own and copies files but it does not copy files when its invoked by installanywhere after installation.

This is what the contents of the batch file are.


copy "%CD%\dllfolder\*.*" "C:\windows\system"
copy "%CD%\dllfolder\*.*" "C:\windows\system32"
pause


As you can see this is just a simple file that copies all files out of "dllfolder" dir to system and system32 directory.

I would appreciate any help or suggestions.


Thanks

pv7721
11-16-2011, 07:14 AM
You've got native copy actions within IA, why don't you use them?

zeeshan12
11-16-2011, 07:31 AM
Where is that option located and how would i copy dll files using that into the system32 dir?

Is there a documentation/support page anywhere that explains how to do this?

Thanks

pv7721
11-16-2011, 10:43 AM
In the Install Task, if you click the Add Action button, you choose General tab, you've got the Copy File and the Copy Folder Actions. You can select your copy targets (be that one or more files) and as for destination folder you can use these two Magic Folders:


System Folder (32-bit)
$SYSTEM_32$
The default 32-bit System folder on a system.



System Folder (64-bit)
$SYSTEM_64$
The default 64-bit System folder on a 64-bit system.


All this information is to be found in IA's help.

zeeshan12
11-17-2011, 05:08 AM
Hi,

Thanks, the copy files issue has been sorted but I have another problem now that I would appreciate if you can give some help with.

The setup runs on system and works fine. I have a log file that my application writes some actions to. It is failing to write into that file, I think its an issue with file permissions on windows 7? :confused: The log file is located within the install directory.

On Windows XP, same setup runs fine and I can see entries appearing in log file.

Could you please suggest any work around for it.

Thanks

pv7721
11-17-2011, 09:33 AM
When does your application write to the log file, during installation or afterwards, once the installation is finished?

zeeshan12
11-17-2011, 10:54 AM
Hi,

It writes to the file after the software has been installed. Its just a log file to record any errors that occur during the application is working.

Thanks

pv7721
11-17-2011, 12:45 PM
Then I guess it's an application / OS issue, not an installer one.