casman
03-22-2006, 06:50 AM
Hi SF7 forum.
I am currently having a problem with the File.Run command in SF7.
Basically, when the generated setup program is run, I want to execute an existing program to perform some actions prior to the installation continuing.
When I run it manually it works fine, but if I run it via File.Run, it always fails with 'File Execution Failed'.
At first I tried the following code:
result = File.Run(SessionVar.Expand("%AppFolder%\\TP Systray Remover.exe"), "", "", SW_MINIMIZE, true);
And it tried to run a program called TP instead, so I assumed the spaces were the problem.
I then tried the following code:
prog2run = SessionVar.Expand("%AppFolder%\\TP Systray Remover.exe");
result = File.Run("prog2run", "", "", SW_MINIMIZE, true);
I have checked the value of prog2run in a debug window and it is correct, however, it always fails to run.
Any guidance would be greatly appreciated.
Thanks in advance.
I am running SF7.0.5.1
Regards,
Casman.
I am currently having a problem with the File.Run command in SF7.
Basically, when the generated setup program is run, I want to execute an existing program to perform some actions prior to the installation continuing.
When I run it manually it works fine, but if I run it via File.Run, it always fails with 'File Execution Failed'.
At first I tried the following code:
result = File.Run(SessionVar.Expand("%AppFolder%\\TP Systray Remover.exe"), "", "", SW_MINIMIZE, true);
And it tried to run a program called TP instead, so I assumed the spaces were the problem.
I then tried the following code:
prog2run = SessionVar.Expand("%AppFolder%\\TP Systray Remover.exe");
result = File.Run("prog2run", "", "", SW_MINIMIZE, true);
I have checked the value of prog2run in a debug window and it is correct, however, it always fails to run.
Any guidance would be greatly appreciated.
Thanks in advance.
I am running SF7.0.5.1
Regards,
Casman.