Jump to content

Equivalent of {user.home} of java in Pascal

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
nla1kor

nla1kor

    Newbie

  • Members
  • Pip
  • 5 posts
I want to know what is the equivqlent of {user.home} of java in pascal for inno scripting.
I want to place the back up files of my toll when i run my .exe file in such a place which does not require admin access to write. till date i was placing it in the registry. i want to get rid of registry and program files and write it in a complete new location. Can you please help me with what could be the new location as well as how to reach the new location using inno scripts?
Thank you.

#2
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 765 posts
You can check if one of these suits your need:
{userappdata}
{localappdata}
{userdocs}
{userprograms}

#3
nla1kor

nla1kor

    Newbie

  • Members
  • Pip
  • 5 posts
Thanks for you reply.
{userappdata} and {localappdata} cannot be used because i need my set up to run in windows 7 environment. And there is no folder called application data.
{userdocs} creates in my documents.
{userprograms} in program files.To access program files i need admin access.
{userdocs} is okie, but can i get any other so that i can use them,in such a way that it supports 64 bit processor as well as 32 bit processor and also without admin access.
Am waiting eagerly for your responses.

#4
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 765 posts
Hi nla1kor,

I think I fully understand what you want, and I know how to get it programmatically. I just don't have good experience with Inno scripting to know how to do that with inno. Let me know if you can port pascal code to detect "user home" dir into inno scripting, I will post the code.

I don't have much experience with Windows 7, but to my understanding {userappdata} and {localappdata} will be created automatically when needed by inno, not by Windows :) I usually use this directory {userappdata} only to store my program's data and configuration, while the binaries still placed in usual "program files" dir. I think you should go this way too. Because storing your binaries under "user home dir" means you will have unnecessarily many copies of your binaries (one set of each user who use your software). My approach also means that you will get better protection (assuming UAC enabled) from possibility of virus hijacking your software stealthily. Because under "program files" your binaries can not be altered without permission from the user, which can not be achieved if you put the binaries under "user home dir".

Edited by LuthfiHakim, 11 November 2010 - 03:22 AM.


#5
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 765 posts
Hi nla1kor,

Your post gave me idea for new tutorial that perhaps can help you with the problem. Please check the tutorial.

#6
nla1kor

nla1kor

    Newbie

  • Members
  • Pip
  • 5 posts
Thank You Mr. LuthiHakim