Convert Wise script to IA

Got a problem you cannot solve? Try here.
get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Convert Wise script to IA

Postby get101 » Wed Jun 20, 2007 6:34 pm

I am changing from Wise Installer to IA Studio.

Can you give me any ideas on where I should start? I want to convert these lines from my Wise script into IA.

Code:

Code: Select all

If File Exists %INST%\\start.af then
     Copy Local File from %INST%\\start.af to %MAINDIR%\\start.ini
Else

 IF THESERNO Equals "100" then
   If File Exists %MAINDIR%\\start100.ini then
     Copy Local File from %MAINDIR%\\start100.ini to %MAINDIR%\\start.ini
   End
 End

 IF THESERNO Equals "200" then
   If File Exists %MAINDIR%\\start200.ini then
     Copy Local File from %MAINDIR%\\start200.ini to %MAINDIR%\\start.ini
   End
 End

End

Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Postby Edhy » Wed Jun 20, 2007 7:02 pm

Hi,

I also came from Wise, and even though there is a Wise importer somewhere in IA forum, it never worked for me :roll:

Start by checking the Pre-Defined Variables topic in the help file. This will give you all the variables you need, so in your particular case you'll need these:

Code: Select all

EXEDIR replaces INST
TARGETDIR replaces MAINDIR
$ sign replaces the % sign


Here is a seudo code of part of your code for IA:

Code: Select all

Does File Exist $EXEDIR$\\Start.af (get result into variable FIND_START)
if Variable FIND_START Equals True
  Copy Local Files $EXEDIR$\\Start.af to $TARGETDIR$\\Start.ini
else
  Comment: Add your code for other logic here...
end


Here is the same code above in IA language so you can copy and paste in your script:

Code: Select all

~InstallAware Clipboard Data~
~End~
~{D729D854-B0FA-4DBC-B7B4-7FD3AA370420}~
~Comment~
~{776B6292-9AE4-4543-BBF5-3DC01084C171}~
~Add your code for other logic here...~
~Else~
~{A0438B0B-9F48-4D50-A338-DFAA79993ACD}~
~Copy/Move Local Files~
~{6973BC65-EAF7-45B0-9F4E-C64E4A1C56CE}~
~$EXEDIR$~
~Start.af~
~$TARGETDIR$~
~Start.ini~
~TRUE~
~FALSE~
~If~
~{FF919687-9D05-42DC-8CAA-4D0762853327}~
~FIND_START~
~0~
~True~
~FALSE~
~Does File/Folder Exist~
~{FD8B3BA3-A94B-4A09-9F93-07A4B1A9846B}~
~FIND_START~
~$EXEDIR$\\Start.af~
~TRUE~


Warning:
I did not test this code above, it is just meant to give you an idea of the path you may follow. :D

Good luck!
Edhy Rijo
Thom Child and Family Services

get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Postby get101 » Thu Jun 21, 2007 12:57 am

Hi Edhy

Your post was very useful - just what I needed to get started.

Thanks!


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 140 guests