Run as Administrator (Windows7) Ita: Esegui come amministrat

Post Reply
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by MarcoBoschi »

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
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 2 times

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by anserkk »

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: Select all | Expand

<?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
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by MarcoBoschi »

The program in in c:\programmi\rubri4ip folder
Thanks
marco
Marco Boschi
info@marcoboschi.it
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by StefanHaupt »

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
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by MarcoBoschi »

Ok,
thanks for the advice

marco
Marco Boschi
info@marcoboschi.it
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by MarcoBoschi »

>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
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Run as Administrator (Windows7) Ita: Esegui come amministrat

Post by StefanHaupt »

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
Post Reply