I have started using successfully your custom action CreateExeProcess as explained here: http://www.advancedinstaller.com/user-g ... indow.html for hiding my custom actions.
However, for one specific custom action: "xcopy" it just doesn't work! I've tried various combinations, but nothing works.
I want to use xcopy to backup some directory before the installation copies files, but I can't seem to understand why it's not working.
If I replace the xopy command with "notepad.exe" I can see that all parameters are passed correctly and everything should be okay, but God knows why this is just not working (and as I mentioned: I'm using this successfully with other things I'm trying to do "hidden").
I'm using it like so:
Code: Select all
Source Path: <AI_CUSTACTS>aicustact.dll
Source Type: Dynamic linked library (*.dll)
Function name: CreateExeProcess
Action Data: xcopy /C /Q /Y "c:\php\php.ini" "c:\backup\"
it works. If I put anything else other than what I'm trying to do with xcopy: it works. Only xcopy doesn't work...
If I try to copy/paste the "Action Data" command from the msi log to a command prompt window: it works! (meaning: the command should have also worked with CreateExeProcess)
I tried also:
xcopy.exe /C /Q /Y "c:\php\php.ini" "c:\backup\"
I also tried:
c:\windows\system32\xcopy.exe /C /Q /Y "c:\php\php.ini" "c:\backup\"
but no combination seemed to work.
I also tried:
cmd.exe /K c:\windows\system32\xcopy.exe /C /Q /Y "c:\php\php.ini" "c:\backup\"
and various places to put quotation marks: but nothing works...
I've moved this command (xcopy) back to "launch file or open URL", and it works! but now the command prompt is shown... and waiting for you help so that I can hide this window again.
I suspect that something in CreateExeProcesss is "sensitive" to the parameters passed and this fails (or something else, but definitely it has to do with CreateExeProcess, since as you can see I manage to make it work with "Launch File or Open URL").
Your help will be greatly appreciated. Dashut.