rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: MarkV on September 06, 2007, 01:03:04 AM

Title: Auto Update and Vista
Post by: MarkV on September 06, 2007, 01:03:04 AM
Well, Vista is a PITA regarding the HFS Autoupdate...   :-[

Code: [Select]
Cannot create file "C:\Windows\system32\hfs.new.exe". Access denied
HFS 2.2a
----------------------------------------------------------------
System   : Windows Vista Professional, Version: 6.0, Build: 1770, ""
Processor: AMD, AMD Athlon(tm) 64 X2 Dual Core Processor 4000+, 2100 MHz MMX
Display  : 1280x1024 pixels, 32 bpp
----------------------------------------------------------------
----------------------------------------------------------------
Product Versions

hfs.exe: Build: 0 02.09.2007 01:14:56
hfs.old.exe: Build: 0 29.07.2007 00:08:48

Programs are no more allowed to write to Program Files and Windows folders even if logged in as an Administrator. Disabling UAC is not an option here.

What is even more ebarassing, Save settings to file isn't working, either. It shows success, but the file is not created. I have to use local registry.

Aww, scratch that, hfs.ini IS created, just not in the actual Program Files dir, but in the VirtualStore. But the Update problem remains, Executables follow different rules.
Title: Re: Auto Update and Vista
Post by: Unknown8063 on September 06, 2007, 05:14:31 AM
Since HFS does not require installation, I suggest placing the exe in a location that does not require administrator rights.  The VirtualStore is annoying to deal with, trust me :)
Title: Re: Auto Update and Vista
Post by: TSG on September 06, 2007, 08:17:04 AM
ye, don't put it in system32... detect where HFS is and put it there? i run my HFS from a folder called 'Server Stuff' lol.
Title: Re: Auto Update and Vista
Post by: MarkV on September 08, 2007, 05:13:27 AM
Lol trust me, HFS is definitely NOT in the C:\Windows\System32 directory, I have no idea why Autoupdate tries to write there...

HFS is in C:\Program Files (x86), but I think I'll change that soon.
Title: Re: Auto Update and Vista
Post by: Foggy on September 09, 2007, 10:27:11 AM
Could the batch file used to update hfs be defaulting to system32 in vista?
Title: Re: Auto Update and Vista
Post by: rejetto on September 09, 2007, 04:07:42 PM
i'm noticing that the exe is downloaded not to the original exe path, but to the "working" folder.
i don't remember the real english name because i use an italian system, but i hope you get the sense.
maybe it should be done in the exe path, what you think?
Title: Re: Auto Update and Vista
Post by: MarkV on September 11, 2007, 05:31:04 AM
I think it should download to the %TEMP% path...

I found an interesting article about making apps UAC aware, maybe it helps...

http://www.codeproject.com/vista-security/MakingAppsUACAware.asp


The best way would be to seperate the update code from the main hfs.exe, like hfsupd.exe or the like. hfsupd.exe then should receive an embedded manifest with requireAdministrator, to correctly popup the UAC confirmation to elevate it's permission level.

hfsupd.exe could be extracted to %TEMP% at runtime and be deleted afterwards.
Title: Re: Auto Update and Vista
Post by: rejetto on September 16, 2007, 02:40:51 AM
yes, that would probably be the best way.
but i'm not gonna spend so much on supporting UAC for now.
till then, i will use the exe path.