The run program command does not start the program.
I have debugged the script and the Run statement is executed but the program is not started (also checked with taskmanager).
I have also checked if the program can be started by hand from any working folder with the absoloute path so being in c:\\ and then run c:\\program files\\testapp\\TestApp.exe and this works.
I also tried the Run As command in your script but also doesn't work.
Any clues?
<<Code Folding Region>>
Comment: End of Installation
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
if Variable REBOOTCOMPUTER Equals TRUE
if Variable SUCCESS Equals REBOOT
Reboot Computer
end
end
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Run Program $TARGETDIR$\\TestApp.exe
Comment: TO-DO: Insert command that starts your application here
end
end
end
end
<<Code Folding Region>>
Run Program command not working
-
- Posts: 15
- Joined: Fri Aug 04, 2006 2:11 pm
- Location: Netherlands
-
- Posts: 15
- Joined: Fri Aug 04, 2006 2:11 pm
- Location: Netherlands
Its a .Net program but actually does not needs the current folder to be the Targetfolder. Anyway I know used the following statement, but still does not work.
Run Program $TARGETDIR$\\TestApp.exe , startup in folder $TARGETDIR$
The links (desktop, startup, quicklaunch) do work after installation. These shortcuts are exactly the same as above.
(the .Net app is using framework v2.0.50727)
Any clue?
Run Program $TARGETDIR$\\TestApp.exe , startup in folder $TARGETDIR$
The links (desktop, startup, quicklaunch) do work after installation. These shortcuts are exactly the same as above.
(the .Net app is using framework v2.0.50727)
Any clue?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I guess you set working directory to $TARGETDIR$?
You can also try to call SetCurrentDirectoryA in kernel32.dll using Call DLL Function to force-change the current directory to $TARGETDIR$.
You can also try to call SetCurrentDirectoryA in kernel32.dll using Call DLL Function to force-change the current directory to $TARGETDIR$.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Alwin van Driel wrote:Its a .Net program but actually does not needs the current folder to be the Targetfolder. Anyway I know used the following statement, but still does not work.
Run Program $TARGETDIR$\\TestApp.exe , startup in folder $TARGETDIR$
The links (desktop, startup, quicklaunch) do work after installation. These shortcuts are exactly the same as above.
(the .Net app is using framework v2.0.50727)
Any clue?
It's a known issue with the .Net programs. Some of them, for some reason, need the you to call the API Michael noticed above. Try it and it should work.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
-
- Posts: 15
- Joined: Fri Aug 04, 2006 2:11 pm
- Location: Netherlands
Tried the above and doesn't work.
The SetCurrentDirectory returns True and the Run Program returns the code -11. Before I used the SetCurrentDirectory the returncode was -2146232576.
I have multiple versions of the .Net framework on my machine (required by other programs). Maybe it has somethine to do with the environment this process is created in?
Currently using the following code (from another topic)
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Set Variable INSTALLDIR to $TARGETDIR$
Convert to Short Path: INSTALLDIR
Call DLL Function kernel32.dll->SetCurrentDirectoryA (get result into variable LASTERROR)
Run Program $INSTALLDIR$\\TestApp.exe
Comment: TO-DO: Insert command that starts your application here
end
end
end
I even tried to make a run.cmd with the .net executable in it, but that also doesn't work.
So still not working, any help I would appreciate (prob wrong spelling
)
The SetCurrentDirectory returns True and the Run Program returns the code -11. Before I used the SetCurrentDirectory the returncode was -2146232576.
I have multiple versions of the .Net framework on my machine (required by other programs). Maybe it has somethine to do with the environment this process is created in?
Currently using the following code (from another topic)
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Set Variable INSTALLDIR to $TARGETDIR$
Convert to Short Path: INSTALLDIR
Call DLL Function kernel32.dll->SetCurrentDirectoryA (get result into variable LASTERROR)
Run Program $INSTALLDIR$\\TestApp.exe
Comment: TO-DO: Insert command that starts your application here
end
end
end
I even tried to make a run.cmd with the .net executable in it, but that also doesn't work.
So still not working, any help I would appreciate (prob wrong spelling

-
- Posts: 5
- Joined: Tue Aug 01, 2006 4:07 am
RUN Program as command not working
What are the requirements to use to Run Program As command. After spend way to long trying to get RUN command to work, I ended up recreating the very simple package again and it finally started working. Running an external setup program in silent mode. Very simple.
Next step was to replace the RUN Program with the RUN Program As version and it no longer works again.
How do I debug this?
Have used several accounts, rights aren’t the issues. Using another tool I can package the external setup which will evaluate the permissions itself when installing, switched back to using the using the RUN Program command and it works fine.
I’m at a lost.
Next step was to replace the RUN Program with the RUN Program As version and it no longer works again.
How do I debug this?
Have used several accounts, rights aren’t the issues. Using another tool I can package the external setup which will evaluate the permissions itself when installing, switched back to using the using the RUN Program command and it works fine.
I’m at a lost.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Run Program As has more fields which lets you run programs under different user accounts. It might have stopped working if you provided an invalid account, or other invalid settings for the program, in the expanded range that Run Program As offers over Run Program.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 210 guests