FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Run as Administrator (Windows7) Ita: Esegui come amministrat
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Wed Jan 12, 2011 08:45 AM
Hi,
I'm testing a fivewin application in windows 7
In bold line

SELECT 0
USE trunk
SET INDEX TO trunk

it gives me the error "Workarea not in use: ORDLISTCLEAR"

If I run as an administrator it works fine.
Is it possible, during installation, to modify this parameter (run as admin) in automatic mode?
There is a little setup and in theory customer installs the program on its own.
What should I do?

Many thanks
marco
Marco Boschi
info@marcoboschi.it
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Wed Jan 12, 2011 10:54 AM
it gives me the error "Workarea not in use: ORDLISTCLEAR"


Where is your application and DBF Located ? Is it in C: root or Inside special folders like C:\Program Files ?

If you want to lift your application execution level (administrator) then you may use the following .Manifest file

Code (fw): Select all Collapse
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="X86"
    name="IsUserAdmin"
    type="win32"
/>
<description>Your application description here.</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
     <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="requireAdministrator"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>


Regards
Anser
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Wed Jan 12, 2011 12:46 PM

The program in in c:\programmi\rubri4ip folder
Thanks
marco

Marco Boschi
info@marcoboschi.it
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Wed Jan 12, 2011 04:20 PM

Marco,

a normal user is not allowed to write in the programs folder. If you try to open a dbf in read/write mode, this will fail and the "Set Index"-command does not find a any workarea.

I suggest to move the data to the ProgramData folder instead and set the path to your databases in your application with SET DEFAULT TO (cDbfDir) to this folder. This works fine for me since XP.

kind regards

Stefan
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Thu Jan 13, 2011 07:38 AM

Ok,
thanks for the advice

marco

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Thu Jan 20, 2011 01:57 PM

>I suggest to move the data to the ProgramData folder instead and set the path to your >databases in your application with SET DEFAULT TO (cDbfDir) to this folder. This works fine for >me since XP.

In win7 I have these folders

c:\users\Public
c:\users\Telefono // telefono is user name
and others
do you mean this folder?

Marco Boschi
info@marcoboschi.it
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Run as Administrator (Windows7) Ita: Esegui come amministrat
Posted: Thu Jan 20, 2011 02:27 PM

Yes, c:\users\public is for "All Users", this is the right one. The programdata folder is a hidden one in the root: c:\ProgramData and is identical with c:\users\public.

kind regards

Stefan

Continue the discussion