the problem really is Vista - it changed all programs to run at a User Level - 
it's easy enough to change - may not be the best way (at least in M$'s eyes)

right click on the desktop shortcut icon and change it to "Run as Administrator"


  ----- Original Message ----- 
  From: Marie F Vihonsky 
  To: Advance Delphi 
  Sent: Tuesday, July 31, 2007 3:35 PM
  Subject: [advanced_delphi] Re-Writing for Vista


  Hi All,

  I have just gotten the first glitches with Vista from users and it 
  involves the logic for writing to the databases and indexs. I'm still 
  of the old DOS mindset and a self-taught programmer. I have all my 
  files located under the main folder where the program is installed and 
  using Inno-Setup, I have the user install to:
  c:\program files\myprogram

  Using Delphi 5, I can determine if the user has installed the program 
  somewhere else by determining where the EXE is located using this code:
  exepath:=ExtractFilePath(Application.ExeName);
  datapath := exepath + 'data\';
  if not DirectoryExists(datapath) then
  if not CreateDir(datapath) then begin
  raise Exception.Create('Cannot create '+ datapath);
  exit;
  end;
  mdxpath := exepath + 'indexs\';
  if not DirectoryExists(mdxpath) then
  if not CreateDir(mdxpath) then begin
  raise Exception.Create('Cannot create '+ mdxpath);
  exit;
  end;

  Under Vista, I understand that this is a NO-NO since it requires write 
  permission from the Administer. Now my Users are all individual HOME 
  users, who are the Admins and don't know how to set-up their pc's to run 
  the program they way it did under all previous versions of Windows.

  I'm at a loss, since I don't have a PC with Vista. Soon to be rectified 
  before I go nuts trying to answer questions from my users!

  Meanwhile, how should I re-write my programs? Where can I write from the 
  program so that the user doesn't need Admin privileges and how do I 
  determine the folder name?

  Marie


   

Reply via email to