mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2007
Posts: 5
X
xiphi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
X
Joined: Jul 2007
Posts: 5
I ran across a this "bug" as I was testing my script's online updater. Any attempts to write/rename a file that ends with .dll fail. This problem doesn't happen when running mIRC as Administrator. I feel that Admin privies shouldn't be needed for this operation and would be very inconvenient to the users of my script to ask them to run as Admin just to update.

Try these scenario's NOT using Admin privies.

First Scenario
1. User is prompted to update.
2. An attempt to download "foo.dll" is made but fails with the "bwrite" command.

Second Scenario
(My possible workaround that fails)

1. User is prompted to update
2. The file is now called "foo.d_".
3. File downloads with no issues.
4. An attempt to rename the file with the "rename" command fails.

Third Scenario

1. Create a file with "//write foo.txt foo bar"
2. Rename that file to "foo.dll" with "//rename foo.txt foo.dll" and the result will be an error saying "unable to rename".

This is the only extension I've come aross on Vista that has this issue.

If anyone can confirm this or shed some light, I would appreciate it.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Quote:

I feel that Admin privies shouldn't be needed for this operation...



This is a windows security issue, not mIRC. mIRC doesn't check for permissions before executing commands, it just errors when it's denied by the operating system.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As RoCK said, this is not related to mIRC at all. You can do online updates without using DLLs and it would save you the problem if you do so.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 5
X
xiphi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
X
Joined: Jul 2007
Posts: 5
My online updater uses sockets. I would need for it to be able to download new or updated dll's for the script without issue.

I have tried one more test to directly write to my documents folder, and that test succeeded.

Any writes that are to the mirc directory are redirected to their compatibility folder without issue.

While this is a windows issue, I'm sure a workaround for mirc can be made to fix this.

In the meantime, I will continue to work on my own workaround for this whether this is fixed or not.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You can't bypass security features put in place by the OS, and to try and do so would be silly. Just make sure you have error-handling code in place to tell the user when they don't have permission to save something to the mIRC directory.

Joined: Jul 2007
Posts: 5
X
xiphi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
X
Joined: Jul 2007
Posts: 5
I was able to workaround it by using darkengine.dll to grab the username and send the data to mIRC's compatibility directory, which is located in "C:\Users\Username\AppData\Local\VirtualStore\Program Files\".

Khaled's post I found here suggests a possible solution he's working on.


Link Copied to Clipboard