有趣的问题 [英] Interesting question

查看:67
本文介绍了有趣的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个应用程序App1和App2。


App1只是检查新版本的App2。


如果找到更新的版本App2将下载App1和App2。 (两者都是

)。这就是我现在在申请中所做的事情。


我从FTP服务器上下载,我可以看到下载进度。

但是,下载时完成后,App1没有更新(我理解,因为它的文件在更新过程中被锁定)。

(不要问我为什么我下载App1然后:))。


所以,我可以看到App1和App2的下载过程,App2得到更新

(因为它不是已锁定),App1没有更新(可能是

,因为它在下载过程中被锁定)。


我的问题是如果我能看到下载进度,更新会怎样?App $的
?不应该弹出警告框说文件访问

拒绝?在我的情况下,它没有。一切看起来都在下载

App1并覆盖它但是当我运行代码时,我可以看到运行的是

实际上是旧的App1。


只是一个有趣的事情,想知道下载文件

究竟发生了什么。


谢谢,


-

Dino Buljubasic

软件开发人员
http://rivusglobal.com

I have two applications App1 and App2.

App1 is just checking for new version of App2.

If it finds newer version of App2 it will download App1 AND App2. (both of
them). That is what I am doing now in my application.

I am downloading from an FTP server and I can see download progress.
However, when the download is finished, App1 is not updated (which I
understand, because its file is being locked in the process of update).
(don''t ask me why I download App1 then :)).

So, I can watch the download process of both App1 and App2, the App2 gets
updated (because it was not locked), App1 does not get updated (probably
because it was locked during the download).

My question is "If I can see download progress, what happens with the update
of App1?" Should not this pop up the warning box saying "File Access
Denied"? In my case it does not. Everything looks like it is downloading
App1 and overwriting it but when I run the code, I can see that what runs is
actually old App1.

Just an interesting thing, wondering what actuallly happens with the file
being downloaded.

Thank you,

--
Dino Buljubasic
Software Developer
http://rivusglobal.com


推荐答案

Dino,

这取决于你的FTP流程。

但这当然永远不会工作

我认为解决方案与所有这些情况一样下载它与

另一个名字。

将新下载的寄存器放入寄存器(这是我的方式,

但它可以是另一个当然也是这样。)

将命令交给下载的程序。

查看寄存器,复制n对旧的重命名(重命名不是

工作)

重新设置寄存器。

然后将命令返回给新的一个。

如果您将杀死下载的复制文件是一个品味问题,我会

离开它。


我希望这能为您带来路线。

Cor
Dino,
This depends on your FTP process.
But this will of course never work
I think that the solution is as in all this cases to download it with
another name.
Putting in the register that it is new downloaded (that is my way doing it,
but it can be another way too of course).
Give the command over to the downloaded program.
Look in the register, copy the newone over the old one (renaming does not
work either)
Set the register back.
And give then the command back to that new one.
If you will kill the downloaded copied file is a matter of taste, I would
leave it.

I hope this brings you on the route.
Cor


当您说Registar时,您是否考虑过注册表?抱歉,没有得到它。


我可能会这样做,以便App1下载App2和App下载

App1。这样,他们会互相下载,因为他们从不同时在

运行。


然而,我仍然不明白会发生什么使用

下载的文件。它通过电线发送肯定,我只是想知道什么

操作系统或者当它发现具有相同

名称的文件已经存在时它正在运行。


谢谢,


-

Dino Buljubasic

软件开发人员
http://rivusglobal.com


" Cor" < no*@non.com>在消息中写道

news:3f *********************** @ reader21.wxs.nl ...
When you say "Registar", are you thinking of registry? Sorry, don''t get it.

I am probably going to do it so that App1 downloads App2 and App downloads
App1. that way, they''ll download each other because they never run at the
same time.

However, I still don''t understand what happens with the file that is
downloaded. It gets sent thru the wires for sure, I am just wondering what
OS or whatever does with it when it finds out that the file with the same
name already exists and that it is running.

Thanks,

--
Dino Buljubasic
Software Developer
http://rivusglobal.com

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Dino,
这取决于你的FTP过程。
但这当然永远不会工作
我认为解决方案与所有这些情况一样下载
另一个名字。
在寄存器中输入它是新下载的(这是我的方式做
它,但当然也可以是另一种方式)。
将命令交给下载程序。
查看注册表,复制旧版本(重命名也不会工作)
设置寄存器。
然后将命令返回给那个新的。
如果你将杀死下载的复制文件是一个品味的问题,我会留下它。

我希望这能带你走上这条路。 />
Dino,
This depends on your FTP process.
But this will of course never work
I think that the solution is as in all this cases to download it with
another name.
Putting in the register that it is new downloaded (that is my way doing it, but it can be another way too of course).
Give the command over to the downloaded program.
Look in the register, copy the newone over the old one (renaming does not
work either)
Set the register back.
And give then the command back to that new one.
If you will kill the downloaded copied file is a matter of taste, I would
leave it.

I hope this brings you on the route.
Cor



Hi Dino,

是的,我的意思是注册表(语言错误)。

要了解会发生什么,很容易测试。

制作一个程序的副本

启动程序并尝试使用资源管理器复制你在运行的程序上复制的程序



你normaly会看到一个不可能的文本。

所以这将在你的程序中抛出一个例子。

Cor
Hi Dino,
Yes I did mean registry (language error).
To find out what happens, is very easy to test.
Make a copy of a program
Start the program and try to copy the one you did copy over the running one
with explorer.
You normaly will see a text that it is impossible.
So that will throw an exeption in your program.
Cor


这篇关于有趣的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆