rejetto forum

Auto Update and Vista

MarkV · 8 · 6506

0 Members and 1 Guest are viewing this topic.

Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
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.
« Last Edit: September 06, 2007, 02:24:27 AM by MarkV »
http://worldipv6launch.org - The world is different now.


Offline Unknown8063

  • Occasional poster
  • *
    • Posts: 96
    • View Profile
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 :)


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
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.
http://worldipv6launch.org - The world is different now.


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
Could the batch file used to update hfs be defaulting to system32 in vista?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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?


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
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.
http://worldipv6launch.org - The world is different now.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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.