Indigo Rose Software
  #1  
Old 09-23-2004
jenny62 jenny62 is offline
Forum Member
 
Join Date: Nov 2003
Posts: 17
action run exe and argument

Hi I was just looking at a trial of this new version and ran into a problem trying to duplicate something that worked in the 6 trial.

With version 6 - for Actions "After Install" I had
an Execute command such as this example:

File to Execute: %WinDir%\FileOne.exe
Command Line Arguments /a /p %WinDir%\FileTwo.abc
Working Directory: %WinDir%

The above worked perfectly. (FileOne was an exe used to run FileTwo a picture show)

But I just can't successfully duplicate it in 7.
There is no Execute in the Actions so I tried the Run action but I just can't get it to work. I get an error that FileTwo cannot be found when I run the setup. Can someone show me exactly what the proper commands should look like to duplicate the above three successful commands that worked in 6.

Oh and when I tried entering the working directory, I get an error too about invalid characters.

thanks for any help - this is driving me dizzy!

jenn
Reply With Quote
  #2  
Old 09-23-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
Bit late at night (er.. early morning) so excuse if not quite right but something like:

File.Run(_WindowsFolder.."\\FileOne.exe", "/a /p %WindowsFolder%\FileTwo.abc", _WindowsFolder, SW_SHOWNORMAL, false);

would probably do it.

Best thing to do is look at the examples in the help file and use the ACTION button on the Actions screen to help build the syntax. Commands are case sensitive and you do need the "\\" to denote folder divider.

John
Reply With Quote
  #3  
Old 09-23-2004
SUF6NEWBIE
Guest
 
Posts: n/a
Hi there, if you hav'nt its well worth a read of the help documentation...
Due to the Great addition of 'LUA' actions scripting some things have
changed..like some of the variables etc are now a little different.

Once you get the general idea..things will come quickly.

for each action eg: the file.run action there is a quick help link you can
use to get an idea of how that action functions in SUF7.

To help get you started:

SUF6
File to Execute: %WinDir%\FileOne.exe
Command Line Arguments /a /p %WinDir%\FileTwo.abc
Working Directory: %WinDir%

SUF7:
%WinDir% is now %WindowsFolder% ..so keep this in mind.
you can even use _WindowsFolder

so try this:

MyFolderFile = SessionVar.Expand("%WindowsFolder%").."\\FileTwo.a bc";
File.Run(_WindowsFolder.."\\FileOne.exe", "/a /p MyFolderFile" , _WindowsFolder, SW_SHOWNORMAL, true);

Hope helps a little.

BTW: John beat me to it but you have several ways of doing things..
Reply With Quote
  #4  
Old 09-24-2004
jenny62 jenny62 is offline
Forum Member
 
Join Date: Nov 2003
Posts: 17
Thanks guys! Finally got it right though both methods did not work.
With John code nothing would happen after the setup.exe was run.
With Suf6Newbie code I would get a "cannot find MyFolderFile" error
but I got it to work with just one line like this:

File.Run(_WindowsFolder.."\\file1.exe", "/a /b file2.abc", _WindowsFolder, SW_SHOWNORMAL, true);

Thanks again, you guys have been a great help and I'm already starting to get the hang of it now though still don't know why I can't get the icon to change yet! Nothin in help about that problem but I'l keep tryin.

jenn
Reply With Quote
  #5  
Old 09-24-2004
Brett's Avatar
Brett Brett is offline
Indigo Rose Staff Member
 
Join Date: Jan 2000
Posts: 2,001
Or, even:

Code:
File.Run(SessionVar.Expand("%WindowsFolder%\\FileOne.exe"),SessionVar.Expand("/a /p %WindowsFolder%\FileTwo.abc"));
Reply With Quote
  #6  
Old 09-24-2004
SUF6NEWBIE
Guest
 
Posts: n/a
Glad you got it to work Jenn, as we are all learning there are a few ways
to acheive the same thing and yes with a goal to keeping lines of
code to a minimum is great !

Bretts one is a goodie ...

Martin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 05:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software