Sign in to follow this  
Followers 0
emmanuel

Comiled Script burned to CD not working

9 posts in this topic

#1 ·  Posted (edited)

I compiled a script, burned it to CD and when it's run, I get this error.

---------------------------

AutoIt Error

---------------------------

Unable to open the script file.

---------------------------

OK 

---------------------------

The script runs fine before being burned to the CD, but after that, even if I copy it to the hard drive off the cd, I get that error.

I've tried this with .102 and the beta .103 from 10/11... It only happens when compiled with the beta... So maybe I should be filing this one under bug reports.

I've attached the scripts, though I doubt it's anything script specific (yes, I will be testing that, soon)

Edit: I said I attached the script, but didn't. Here it is:

;check for DR icons of CGP and ACES and update either one
$szUpdateAces = FileExists(@DesktopCommonDir & '\Install Aces for Disaster Recovery.lnk');check these names
$szUpdateCGP = FileExists(@DesktopCommonDir & '\Install Caminus Gas for Disaster Recovery.lnk');check these names

If $szUpdateAces = 1 Or $szUpdateCGP = 1 Then
   If $szUpdateAces = 1 Then
     ;install Aces for dr from cd drive
      checkaces (1)
      If FileExists("C:\dr\aces") Then
         $msg = "ACES setup at C:\dr\aces" & @LF
      Else
         $msg = "c:\dr\aces not found" & @LF 
      EndIf   
   EndIf
   
   If $szUpdateCGP = 1 Then
     ;install CGP for dr from cd drive
      checkcgp (1)
      If FileExists("C:\dr\aces") Then
         $msg = $msg & "CGP setup at C:\dr\CGP"
      Else
         $msg = $msg & "c:\dr\CGP not found"
      EndIf
   EndIf
   
   MsgBox(0, "DR Prep", $msg)
Else
   checkpatch(0)
   checkaim(0)
   checkaces(0)
   checkcgp(0)
   checkvpn(0)
EndIf

;I have the following in a seperate file, included in the above:

Func checkpatch($s) 
   If $s = 0 Then 
      $CHECKpatch = MsgBox(4, "patch?", "Launch secpatch for 2k?")
   Else
      $CHECKpatch = 6
   EndIf
   If $CHECKpatch = 6 Then
      If @OSVersion = "WIN_2000" Then
         RunWait(@ComSpec & " /c " & 'echo "%computername%","%username%",%date%,%time%>>\\sgennos1\patched\KB835732\2K_patched.txt')
         RunWait(@ComSpec & " /c " & '%LOGONSERVER%\SYSVOL\puget.com\scripts\KB835732-2K.exe /quiet /norestart')
      EndIf
   EndIf
EndFunc  ;==>checkpatch

Func checkaim($s)
   If $s = 0 Then
      $CHECKAIM = MsgBox(4, "AIM?", "Launch AIM install?")
   Else
      $CHECKAIM = 6
   EndIf
   If $CHECKAIM = 6 Then 
      RunWait("\\sgendstx\clntadm_Traders\tools\autoit\AIM Install\Auto Install AIM.exe")
   Else
   EndIf
EndFunc  ;==>checkaim

Func checkaces($s)
   If $s = 0 Then 
      $checkaces = MsgBox(4, "ACES ICONS?", "ACES DR ICONS?")
   Else
      $checkaces = 6
   EndIf
   If $checkaces = 6 Then 
      DirCreate("c:\dr\aces")
      FileCopy("\\Sgendstx\clntadm_traders\tools\autoit\Aces_Install_src\Install Aces for DR.exe", "c:\dr\aces\*.*", 1)
      FileCreateShortcut('c:\dr\aces\Uninstall Aces.exe', @DesktopCommonDir & '\Uninstall Aces.lnk')
      FileCreateShortcut('"c:\dr\aces\Install Aces for DR.exe"', @DesktopCommonDir & '\Install Aces for Disaster Recovery.lnk')
   Else
   EndIf
EndFunc  ;==>checkaces

Func checkcgp($s)
   If $s = 0 Then
      $CHECKCGP = MsgBox(4, "CGP ICONS?", "CGP DR ICONS?")
   Else
      $CHECKCGP = 6
   EndIf
   If $CHECKCGP = 6 Then 
      SplashTextOn("cgp prep", "prepping CGP for DR", 250, 100)
      DirCreate("c:\dr\cgp")
      DirCopy("\\sgendstx\clntadm_Traders\tools\autoit\cgp_install_src\ORACLE_SRC", "c:\dr\ORACLE_SRC")
      FileCopy("\\sgendstx\clntadm_Traders\tools\autoit\cgp_install_src\Install CGP for DR.exe", "C:\dr\cgp\*.*", 1)
      FileCopy("\\sgendstx\clntadm_Traders\tools\autoit\cgp_install_src\Uninstall CGP for DR.exe", "C:\dr\cgp\*.*", 1)
      FileCreateShortcut('"C:\dr\cgp\Uninstall CGP for DR.exe"', @DesktopCommonDir & '\Uninstall Caminus Gas.lnk')
      FileCreateShortcut('"C:\dr\cgp\Install CGP for DR.exe"', @DesktopCommonDir & '\Install Caminus Gas for Disaster Recovery.lnk')
      SplashOff()
      MsgBox(48, "DR Prep", "CGP prepped", 5)
   Else
   EndIf
EndFunc  ;==>checkcgp

Func checkvpn($s)
   If $s = 0 Then
      $INSTALLVPN = MsgBox(4, "VPN?", "Launch VPN setup?  Reboot is required.")
   Else
      $INSTALLVPN = 6
   EndIf
   If $INSTALLVPN = 6 Then 
      Run("\\sgendstx\clntadm_Traders\tools\autoit\checkpoint\self contained checkpoint install and config.exe")
   Else
   EndIf
EndFunc  ;==>checkvpn
Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites



Maybe a bad burn? Compressed items can corrupt easily when burn't. Did you burn slow? Just a thought.

Share this post


Link to post
Share on other sites

I personally have a single script that I have been using since 3 months ago. I have compiled and changed it with each new version and have been running it every day on multiple systems without problems. Try doing an md5 sum on the file on cd versus the file on the HD.


Who else would I be?

Share this post


Link to post
Share on other sites

I personally have a single script that I have been using since 3 months ago. I have compiled and changed it with each new version and have been running it every day on multiple systems without problems. Try doing an md5 sum on the file on cd versus the file on the HD.

<{POST_SNAPBACK}>

Are you still using the old build? He said the error occurred with the recent 10/11 build it might be a more recent bug.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

I have compiled and changed it with each new version

Umm, Valik, an opportunity here...


Who else would I be?

Share this post


Link to post
Share on other sites

Maybe a bad burn? Compressed items can corrupt easily when burn't. Did you burn slow? Just a thought.

<{POST_SNAPBACK}>

It's not a bad burn, the problem only comes with script compiled in newer version.

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

I'm running newest version. So latter I try a burn and see what happens.

Share this post


Link to post
Share on other sites

Ok, this is odd, I moved the # include from the begining of the script to the end and now it works when compiled by the beta. very wierd.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

@emmanuel

I have burned to cd, some of my compiled scripts and tried your compiled script (minus some action lines). Seemed to work fine.

Share this post


Link to post
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
Sign in to follow this  
Followers 0