Run Program command not working

Got a problem you cannot solve? Try here.
Alwin van Driel
Posts: 15
Joined: Fri Aug 04, 2006 2:11 pm
Location: Netherlands

Run Program command not working

Postby Alwin van Driel » Sat Aug 05, 2006 1:32 pm

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>>

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Sat Aug 05, 2006 2:13 pm

Is your program, a .net program?
Does it need the initial directory set?You have to set the working directory to $TARGETDIR$.
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

Alwin van Driel
Posts: 15
Joined: Fri Aug 04, 2006 2:11 pm
Location: Netherlands

Postby Alwin van Driel » Sun Aug 06, 2006 4:56 am

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?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sun Aug 06, 2006 7:31 am

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$.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Sun Aug 06, 2006 12:17 pm

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

Alwin van Driel
Posts: 15
Joined: Fri Aug 04, 2006 2:11 pm
Location: Netherlands

Postby Alwin van Driel » Sun Aug 06, 2006 3:57 pm

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 :wink: )

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Wed Aug 16, 2006 3:36 am

This might be a stupid question,
but dit you preform the "Apply Install" before you use the run program?


just asking...
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]

GavinSmith
Posts: 5
Joined: Tue Aug 01, 2006 4:07 am

RUN Program as command not working

Postby GavinSmith » Wed Aug 16, 2006 11:26 pm

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.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Aug 17, 2006 4:37 pm

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/


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 260 guests