Jump to content

FileInstall Freaking out


Recommended Posts

$integrate = "no"; put "no" to have the images in Scriptdir\Autorunpics\ put yes to have the pictures in Scriptdir\Autorunpics\ to be integrated into the compiled script
$cdrom=@ScriptDir & "\"
$installs=@ScriptDir & "\$OEM$\Install\"
$wpipath=@ScriptDir & "\$OEM$\WPI\"

Select
    Case $integrate = "no"
        $imagedir=@ScriptDir & "\Autorunpics\"
        $icon = $imagedir & "funker.ico"
        $wpiimage = $imagedir & "wpi.jpg"
        $winimage = $imagedir & "windowssetup.jpg"
        $excdimage = $imagedir & "explorecd.jpg"
        $exinstall = $imagedir & "exploreinstall.jpg"
        $exitim = $imagedir & "exit.jpg"
    Case $integrate = "yes"
        DirCreate ( @TempDir & "\Autorunpics\" )
        $icon = $imagedir & "funker.ico"
        $wpiimage = $imagedir & "wpi.jpg"
        $winimage = $imagedir & "windowssetup.jpg"
        $excdimage = $imagedir & "explorecd.jpg"
        $exinstall = $imagedir & "exploreinstall.jpg"
        $exitim = $imagedir & "exit.jpg"
        FileInstall ( @ScriptDir & "\Autorunpics\wpi.jpg" , $wpiimage )
        FileInstall ( @ScriptDir & "\Autorunpics\windowssetup.jpg" , $winimage )
        FileInstall ( @ScriptDir & "\Autorunpics\explorecd.jpg" , $excdimage )
        FileInstall ( @ScriptDir & "\Autorunpics\exploreinstall.jpg" , $exinstall )
        FileInstall ( @ScriptDir & "\Autorunpics\exit.jpg" , $exitim )
        FileInstall ( @ScriptDir & "\Autorunpics\funker.ico" , $icon )
EndSelect

why does it yell at me so?

Link to comment
Share on other sites

You are using a macro in the source field of your FileInstall() calls. Try:

···
  FileInstall ( "Autorunpics\wpi.jpg" , $wpiimage )
        FileInstall ( "Autorunpics\windowssetup.jpg" , $winimage )
        FileInstall ( "Autorunpics\explorecd.jpg" , $excdimage )
        FileInstall ( "Autorunpics\exploreinstall.jpg" , $exinstall )
        FileInstall ( "Autorunpics\exit.jpg" , $exitim )
        FileInstall ( "Autorunpics\funker.ico" , $icon )
  ···

P.S. I believe that the only way to prevent files from being integrated into a compiled script is to comment out the FileInstall() lines -- I'm quite certain that your $integrate variable will only be evaluated at runtime.

Edited by LxP
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...