randem here is a Script, what i need to do else in this matter as INNO Script is showing some erroe in the script:
[CODE]
; ********** Version 7.1 Build 6 Trial
; Randem Systems, Inc.
; Copyright 2003-2007
; Website: http://www.***********
; Support: http://www.**********.com/cgi-bin/discus/discus.cgi
; OS: Windows XP 5.1 build 2600 (Service Pack 2)

; Date: August 07, 2007

; VB Runtime Files Folder: D:\Nola Project\Copy of final\vbrun60sp3\
; Visual Basic Project File (.vbp): C:\Program Files\Randem Systems\**********\********** 7.0\Sample\Sample.vbp
; Inno Setup Script Output File (.iss): C:\Documents and Settings\rony\Desktop\Marco Tech Release Release.iss
; Script Template Files (.tpl): C:\Program Files\Randem Systems\**********\********** 7.0\Templates\Release.tpl
; : C:\Program Files\Randem Systems\**********\********** 7.0\Templates\VBRuntime.tpl
; : C:\Program Files\Randem Systems\**********\********** 7.0\Templates\Vista.tpl

; ------------------------
; References
; ------------------------

; ActiveMovie control type library - (quartz.dll)
; Application Performance Explorer Logger - (AELOGGER.EXE)
; BWXmlHttp Type Library (v1.0) - (BWXmlOffline.dll)
; ComPlus 1.0 Catalog Replication Type Library - (comrepl.dll)
; Microsoft Shell Controls And Automation - (SHELL32.dll)
; Visual Basic runtime objects and procedures - (MSVBVM60.DLL)


; --------------------------
; Components
; --------------------------

; Microsoft Common Dialog Control 6.0 (SP6) - (comdlg32.ocx)
; Microsoft Rich Textbox Control 6.0 (SP6) - (richtx32.ocx)
; Microsoft Windows Common Controls 6.0 (SP6) - (mscomctl.ocx)


[Setup]
ChangesAssociations=yes

;-----------------------------------------------------------------------------------------------------
; Taken from VBP Project File Parameters AppName, AppName AppVersion and Company
;-----------------------------------------------------------------------------------------------------

AppName=**********
AppVerName=********** 5.1.4
AppPublisher=Randem Systems, Inc.

;-----------------------------------------------------------------------------------------------------

AppVersion=5.1.4
VersionInfoVersion=5.1.4
AllowNoIcons=no
DefaultGroupName=**********
DefaultDirName={code:GetAppFolder}\**********
AppCopyright=Copyright 2003, 2004
PrivilegesRequired=Admin
MinVersion=4.1,5.0sp6
Compression=lzma
OutputBaseFilename=**********514Release

[Tasks]
Name: Association2; Description: Associate Sample Temp Files; GroupDescription: Associate Files:
Name: Association1; Description: Associate Sample Test Files; GroupDescription: Associate Files:
Name: AutoOSUpdater; Description: Install MDAC's for Database Operations; GroupDescription: Install MDAC's:

[Files]
Source: vb_dcom_mdac_jet_autosetup.exe; DestDir: {tmp}; Flags: deleteafterinstall ignoreversion nocompression;
Source: scripten.exe; DestDir: {tmp}; Flags: deleteafterinstall ignoreversion nocompression; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.02
Source: scr56en.exe; DestDir: {tmp}; Flags: deleteafterinstall ignoreversion nocompression; MinVersion: 4.1,4.0; OnlyBelowVersion: 0,4.01
Source: d:\nola project\copy of final\iamge list.mdb; DestDir: {app}; Flags: ignoreversion;
Source: quartz.dll; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: c:\program files\microsoft visual studio\common\tools\ape\aelogger.exe; DestDir: {sys}; Flags: sharedfile;
Source: bwxmloffline.dll; DestDir: {sys}; Flags: sharedfile;
Source: comrepl.dll; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: comdlg32.ocx; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: richtx32.ocx; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: mscomctl.ocx; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: c:\program files\randem systems\**********\********** 7.0\**********.exe; DestDir: {app}; Flags: ignoreversion;
Source: d:\nola project\copy of final\vbrun60sp3\oleaut32.dll; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: d:\nola project\copy of final\vbrun60sp3\msvbvm60.dll; DestDir: {sys}; Flags: regserver restartreplace sharedfile;

[INI]
Filename: {app}\**********.url; Section: InternetShortcut; Key: URL; String:

[Icons]
Name: {group}\**********; Filename: {app}\**********.exe; WorkingDir: {app}
Name: {group}\{cm:ProgramOnTheWeb, **********}; Filename: {app}\**********.url
Name: {group}\{cm:UninstallProgram, **********}; Filename: {uninstallexe}

[Run]
Filename: {tmp}\VB_DCOM_MDAC_JET_AutoSetup.exe; Parameters: /NORESTART /VERYSILENT; WorkingDir: {tmp}; Flags: skipifdoesntexist; Tasks: AutoOSUpdater
Filename: {tmp}\scr56en.exe; Parameters: /r:n /q:1; MinVersion: 4.1,4.0; OnlyBelowVersion: 0,4.01; WorkingDir: {tmp}; Flags: skipifdoesntexist
Filename: {tmp}\scripten.exe; Parameters: /r:n /q:1; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.02; WorkingDir: {tmp}; Flags: skipifdoesntexist
Filename: {app}\**********.exe; Description: {cm:LaunchProgram, **********}; Flags: nowait postinstall skipifsilent; WorkingDir: {app}

[UninstallDelete]
Type: files; Name: {app}\**********.url

[Registry]
Root: HKCR; SubKey: .tmp; ValueType: string; ValueData: Sample.Tempfiles; Flags: uninsdeletekey; Tasks: Association2
Root: HKCR; SubKey: Sample.Tempfiles; ValueType: string; ValueData: Sample Temp Files; Flags: uninsdeletekey; Tasks: Association2
Root: HKCR; SubKey: Sample.Tempfiles\Shell\Open\Command; ValueType: string; ValueData: {sys}\Notepad.exe %1, open; Flags: uninsdeletevalue; Tasks: Association2
Root: HKCR; Subkey: Sample.Tempfiles\DefaultIcon; ValueType: string; ValueData: {sys}\Notepad.ico, -1; Flags: uninsdeletevalue; Tasks: Association2

Root: HKCR; SubKey: .tst; ValueType: string; ValueData: Sample.Testfiles; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: Sample.Testfiles; ValueType: string; ValueData: Sample Test Files; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: Sample.Testfiles\Shell\Open\Command; ValueType: string; ValueData: {app}\Sample.exe %1, open; Flags: uninsdeletevalue; Tasks: Association1
Root: HKCR; Subkey: Sample.Testfiles\DefaultIcon; ValueType: string; ValueData: {app}\Sample.ico, -1; Flags: uninsdeletevalue; Tasks: Association1


Code:
function GetAppFolder(Param: String): String;
begin
  if InstallOnThisVersion('0,6', '0,0') = irInstall then
    Result := 'C:\Users\Public\' + ExpandConstant('{username}') 
  else
    Result := ExpandConstant('{pf}');
end;