Hi all,
I have my application running and working but I cant seem to get the variable Drive.Eject(_SourceDrive) working.
I get windows error 'Windows - No Disk : There is no disk in the drive. Please insert a disk into drive F:. '
Where do i put this variable ? I have tried this in:
1 Project - Actions - On Shutdown = fails with windows error
2 In my steps below - fails, windows error
2 Page - Properties - Script - On Close = fails with windows error
Can anyone help me please?
My Project
-- Check to see if the Scripts folder exists in C:\.
does_exist = Folder.DoesExist("C:\\Scripts");
-- Display a dialog telling the user whether or not the folder exists.
if does_exist then
Dialog.Message("Notice", "The folder C:\\Scripts already exists in your system. This update will terminate", MB_OK, MB_ICONINFORMATION);
Application.Exit(0);
else
Folder.Create("C:\\Scripts")
Dialog.TimedMessage("Please Wait...", "Files will be copied to your pc, this may time a few minutes...", 5000, MB_ICONINFORMATION);
StatusDlg.Show();
File.Copy(_SourceFolder .. "\\Scripts\\*.*", "C:\\Scripts\\", true, true, false, true, nil);
StatusDlg.Hide();
result = Dialog.Message("Finished", "All tasks have been completed successfully. This program will close and the CDROM will be ejected.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
Application.Exit(0);
end

Reply With Quote

