FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Trouble with windows 7
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Trouble with windows 7
Posted: Mon Jun 27, 2011 07:43 PM

Hag,
please move your program into a c:\users\cUsername folder.
And it works fine!

Bye

Marco

Marco Boschi
info@marcoboschi.it
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Trouble with windows 7
Posted: Mon Jun 27, 2011 07:55 PM
it crashes except when it's opened as an administrator


this points to a permission problem.

Please check the rights a normal user has for the installation directory on every pc. He must have the right Change (this includes read and write). Simply set this right to the group Everyone.

Every new folder inherits the rights of it´s parent folder, so a new folder in C: inherits the rights of C: and there a normal user is not allowed to write there.
kind regards

Stefan
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Trouble with windows 7
Posted: Mon Jun 27, 2011 09:34 PM

The program is an over the counter program sold via net world wide. Each user has their own issue re rights. We can't be held responsible of each user.
would it be appropriate to detect win 7 and give them a message to open as an administrator?

Thank you

Harvey
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Trouble with windows 7
Posted: Tue Jun 28, 2011 08:27 AM
would it be appropriate to detect win 7 and give them a message to open as an administrator?


yes, that could be one way to go.

But in your case I think it´s better to follow the advice from Marco, just change the installation directory (if possible) to c:\users\<username>\YourFolderName>. Now the user don´t have to care of permissions.
If more than one user works with your app on the same pc, it´s also possible to change the installation directory to c:\users\public\YourFolderName>.

For the future I suggest you seperate the data from the executables and put the data in c:\programdata and the exe in c:\program files. Inside your application you can easily change the path to you data with SET DEFAULT TO c:\programdata\<YourFolder>. All indexes are automatically put in that folder, too.
kind regards

Stefan
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Trouble with windows 7
Posted: Tue Jun 28, 2011 02:03 PM

Stefan
The first item u suggest won't work. Too many users.

Iill give the second item (set default) a try.

Thank you

Harvey
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Trouble with windows 7
Posted: Wed Jun 29, 2011 07:42 AM
Harvey,

if you need further help, please contact me.


I have a kind of automatism in the first lines of my app that checks all folder dependend of the os.

Code (fw): Select all Collapse
GLOBAL cHomeDir := "", cInstallDir := ""   // Datenverzeichnis, Installationsverzeichis

   PROCEDURE Main (cPath)

   DEFAULT cPath := ""
   cPath := CharRem ("-/", cPath)

   IF IsWin98() .or. Upper (cPath) == "HOME"// .or. IsWinME ()

     cInstallDir := cFilePath (GetModuleFileName () )
     cHomeDir := cInstallDir 

   ELSE

     cInstallDir := cFilePath (GetModuleFileName () )

     #IFDEF Demo                                       // Demo wird im eigenen Nutzerverzeichnis erstellt
       cUserDir := GetEnv ("UserProfile")+"\Eigene Dateien\"
     #ELSE
       cUserDir := "c:\ProgramData"       //GetEnv ("AllUsersProfile")+"\Dokumente\"
     #ENDIF

     cHomeDir := cUserDir+"Wintyre\"

   ENDIF

   SET DEFAULT TO (cHomeDir)

   IniFile := Set (_SET_DEFAULT)+"Wt32.ini"
   SetErrorLog (cHomeDir+"Error.log")         // Errorlog ins Datenverzeichnis schreiben
   SET HELPFILE TO cInstallDir+"\Wintyre.chm"  // Hilfedatei
   cHandbuch := cInstallDir+"\WIntyre.pdf"     // Handbuchdatei
kind regards

Stefan

Continue the discussion