Run as Administrator (Windows7) Ita: Esegui come amministrat

Run as Administrator (Windows7) Ita: Esegui come amministrat

Postby MarcoBoschi » Wed Jan 12, 2011 8: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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby anserkk » 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: Select all  Expand view  RUN
<?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
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

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

Postby MarcoBoschi » Wed Jan 12, 2011 12:46 pm

The program in in c:\programmi\rubri4ip folder
Thanks
marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby StefanHaupt » Wed Jan 12, 2011 4: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

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

Postby MarcoBoschi » Thu Jan 13, 2011 7:38 am

Ok,
thanks for the advice

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby MarcoBoschi » Thu Jan 20, 2011 1: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?
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby StefanHaupt » Thu Jan 20, 2011 2: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 43 guests