Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#337 closed Bug (Works For Me)

TraySetIcon causes read only error

Reported by: Queue Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.0 Severity: None
Keywords: Cc:

Description

TraySetIcon causes read-only error when loading icon from read-only resource. Example:

TraySetIcon(@AutoItExe, 164)

In this example, if the compiled script resides on a flash drive that has a read-only switch set to read-only, and the script is run in certain WinXP environments, a windows error message pops up halting script execution (the choices are "Continue," "Try Again" and "Cancel;" Continue or Cancel will continue script parsing without error, Try Again simply pops the message up again).

The error also occurs with an uncompiled script if the AutoIt executable is located on the read-only media.

Note this error doesn't seem to occur on Win98SE or Vista Home 32-bit SP1. The environment where I encounter this error is WinXP Pro SP3 on a full administrator account.

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by Jon

  • Resolution set to Works For Me
  • Status changed from new to closed

We've not been able to reproduce this. We suspect it may be an AV related problem.

comment:2 Changed 16 years ago by Queue

It's not AV related, as there's no AV of any sort installed on the machine I've been testing this on. The error message is as follows (it's a Windows error that is not specific to AutoIt):
AutoIt v3: ScriptName.exe - Write Protect Error
The disk cannot be written to because it is write protected. Please remove the write protection from the volume VOLUME NAME in DRIVELETTER:.
Cancel &Try Again &Continue

The same error is triggered by many other programs when attempting to open a file on the read-only device, but not EVERY file open triggers it; I suspect it's related to the permissions requested when opening the file for access. One way around this, as odd as it sounds, is to make a simple program with NSIS that simply launches the AI3 compiled script; for whatever reason that suppresses the error messages (it does for any other program that's triggering the error as well). This fix isn't inherited though, as a program then launched by the AI3 compiled script can still trigger the error.

A Flash Drive with a read-only switch (with the switch set to read-only) and WinXP Pro SP3 running as Administrator are the general specifics; I honestly can't provide better details, it's as generic of a (legitimate) Windows install as could be. Nothing's running in the background aside from the usual (lsass, csrss, smss, winlogon, services, explorer; the only non default services are for .NET and an ATI video card and all of the ATI services are set to disabled).

Anyhow, leaving it as closed since if you can't reproduce it there's not much you can do.

Queue

comment:3 Changed 16 years ago by Valik

I just looked over the code. There's no permission issue anywhere. In fact there are no permissions used at all. Reading the icon is done via a standard Windows API function for reading icons.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.