PDA

View Full Version : 5003 woes


John_Klassek
12-21-2003, 03:08 AM
Since upgrading to version 5003, you'll be interested to note that on both my machines, the File.Copy fails to work

File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\1024*.bmp", _WindowsFolder, true, true, false, true, nil);

as also does the File.Extract

myDocs = Shell.GetFolder(SHF_MYDOCUMENTS);
Zip.Extract("\\Setup\\Pictures\\Pictures.zip", {"*.*"}, myDocs.."\\My Pictures\\", false, false, "", ZIP_OVERWRITE_NEVER, nil)

Now, I'm not really sure why this is, but I'm sure it's something simple that's been overlooked in the coding of APMS5 5.0.0.3

I noticed in several instances that File.Copy appeared to copy a bitmap file across to the destination, but the result was a bitmap with 0 bytes.

Now that's one for the books.

Cheers,

John

John_Klassek
12-21-2003, 03:38 AM
In order to have a project working over the xmas/new year break, I've uninstalled APMS5, reinstalled it, upgraded to 5.0.0.1 and all processes tested so far work fine.

Wow, what a way to end the year on!

Cheers,

John

PS Don't you just love [hate] bugs - they keep you awake at night, at the PC for inordinate amounts of time, and give you a few grey hairs in the process.

PPS No mention of Product Activation on reinstallation.

Brett
12-22-2003, 09:28 AM
Thanks for the report, John. We'll look into those issues that you mentioned for sure. As far as the activation goes, you should not need to re-activate when you re-install if it is on the same system as a previous successful activation was performed on.

Brett
12-29-2003, 01:18 PM
John,

I have been doing some tests with 5.0.0.3 with File.Copy and Zip.Extract and cannot replicate the problem. The files copy/extract as expected. Are there any other variables in the test that I should be looking out for? Do you use any sort of progress indication (StatusDlg, etc.) during the operation? Can you make a small project that demonstrates the behavior, export it to an archive (.apz) and then post it here or email it to me (brett@indigorose.com)?

If I can replicate that behavior I will definitely look into the problem further. As far as I know, we did not change the behavior of those functions between 5.0.0.1 and 5.0.0.3.

John_Klassek
12-29-2003, 11:41 PM
Hi Brett,

The code typically is as follows:

StatusDlg.Show(MB_ICONINFORMATION, true)
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\1024*.bmp", _WindowsFolder, true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\800*.bmp", _WindowsFolder, true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\1024*.jpg", _WindowsFolder, true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\classicsm.bmp", "C:\\Documents and Settings\\All Users\\Application Data\\Microsoft\\User Account Pictures\\Default Pictures\\", false, true, true, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\classic.exe", _WindowsFolder, true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\OEM*.*", _WindowsFolder .. "\\System32", true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\OEM*.*", _WindowsFolder .. "\\System", true, true, false, true, nil);
File.Run(_SourceFolder.."\\Setup\\screensav\\ClassicSCR.EXE", "", "", SW_SHOWNORMAL, true);
Folder.Create("D:\\Backup");
Folder.Create("D:\\Backup\\Ghost");
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\classic.exe", "D:\\Backup\\Ghost", true, true, false, true, nil);
File.Copy(_SourceFolder.."\\Setup\\Backup\\Ghost\\Do_not_delete.txt", "D:\\Backup\\Ghost", true, true, false, true, nil);
Folder.Create("D:\\Classic");
Folder.Create("D:\\Classic\\Video");
Folder.Create("D:\\Classic\\Drivers");
Folder.Create("D:\\Classic\\Utility");
-- Extract 1024x768 bitmaps to folder for screensaver but first get the path to the user's My Documents folder.
myDocs = Shell.GetFolder(SHF_MYDOCUMENTS);
Zip.Extract("Setup\\Pictures\\Pictures.zip", {"*.*"}, myDocs.."\\My Pictures\\", false, false, "", ZIP_OVERWRITE_NEVER, nil)
File.Copy("\\Setup\\Test.doc", myDocs.."\\", false, true, true, false, nil)
File.Copy("\\Setup\\Test.doc", "D:\\Classic\\", false, true, true, false, nil)
StatusDlg.Hide();
File.Copy(_SourceFolder.."\\Setup\\ClassicIT\\classic.exe", _WindowsFolder, true, true, false, true, nil);
Registry.SetValue(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Ru n", "ClassicRun", "C:\\Windows\\classic.exe", REG_SZ)
Registry.SetValue(HKEY_CURRENT_USER, "\\Software\\Microsoft\\Internet Explorer\\Main", "Start Page", "http://www.classic-it.com.au", REG_SZ);
Dialog.Message("Action Status", "Done. \nComplete customisation.", MB_OK, MB_ICONINFORMATION);



Since going back to 5001 all has worked fine, once the projects were rebuilt. However, FYI, this was the code I used, and on both PCs that were upgraded to 5003, the result for the above code was the same: neither File.Copy or File.Extract would work properly.

Let me know if you can pick on something obvious here; otherwise I'm happy to re-create the project (minus the numerous installation files), and send that to you.

Thanks again.

John

I appreciate you looking into this.

John_Klassek
12-30-2003, 05:13 AM
Hi Brett,

I have just emailed you a link to a small project that can replicate this File.Copy and Zip.Extract issue in v 5003.

It's always nice to nail such a bug. This afternoon I again upgraded to 5003 and after some initial dismay, was able to replicate it in this small project.

Thanks again for looking into this.

Cheers,

John