Trouble with windows 7

Re: Trouble with windows 7

Postby MarcoBoschi » Mon Jun 27, 2011 7:43 pm

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

Bye

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

Re: Trouble with windows 7

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

Re: Trouble with windows 7

Postby hag » Mon Jun 27, 2011 9: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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Trouble with windows 7

Postby StefanHaupt » Tue Jun 28, 2011 8: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Trouble with windows 7

Postby hag » Tue Jun 28, 2011 2: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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Trouble with windows 7

Postby StefanHaupt » Wed Jun 29, 2011 7: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: Select all  Expand view
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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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