How to change Default TARGETDIR to User Directory?
How to change Default TARGETDIR to User Directory?
By default InstallAware seems to make the TARGETDIR be $PROGRAMFILES$\$TITLE$. I would like to change it so that it goes to the user's user directory instead. An example would be "C:\Users\risto" I can't seem to find a per user variable that locates to this. I can find the MyDocuments though. But I don't want to install into My Documents. Any thoughts?
Re: How to change Default TARGETDIR to User Directory?
I did some searching online for different windows environment variables. HOMEPATH seems to work within windows. Is there an equivalent variable in InstallAware? Or can I use Windows Environment variables somehow?
Re: How to change Default TARGETDIR to User Directory?
Nope. I tried using %HOMEPATH% and it still wants to always go to the C:\Users\Username\Desktop folder. I don't want to install to the desktop by default. There has to be a way to get the intended location.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to change Default TARGETDIR to User Directory?
Dear Ristogod,
try the following;
The same ... as InstallAware Clipboard format;
Regards
try the following;
Code: Select all
Set Variable MY_PATH to
Set Variable MY_USER to
Get Folder Location My->My Documents into MY_PATH
Get System Setting Logged on User Name into MY_USER
Parse String $MY_PATH$ into Variables MY_PATH and (Split at first occurrence of pattern)
Set Variable MY_PATH to $MY_PATH$$MY_USER$
The same ... as InstallAware Clipboard format;
Code: Select all
~InstallAware Clipboard Data~
~Set Variable~
~{8C541835-DFAD-40A3-AE7D-6994A53895FC}~
~MY_PATH$MYAH$MYAH$FALSE~
~$MY_PATH$$MY_USER$~
~Parse String~
~{9BE12017-5804-4F21-9DAD-BC22FCF0AE0E}~
~$MY_PATH$~
~$MY_USER$~
~MY_PATH~
~~
~0~
~FALSE~
~FALSE~
~Get System Settings~
~{6709E92F-AE04-4C43-88D9-CF944DE9C251}~
~MY_USER~
~60~
~Get Folder Location~
~{239D7695-A926-49BB-8E94-0A628E9F1B3F}~
~MY_PATH~
~2~
~FALSE~
~Set Variable~
~{BF34AE3F-993B-4E53-82A3-923FCDFC7F3C}~
~MY_USER$MYAH$MYAH$FALSE~
~~
~Set Variable~
~{CB12FC90-1243-40DD-A041-7E8E19618BD9}~
~MY_PATH$MYAH$MYAH$FALSE~
~~
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: How to change Default TARGETDIR to User Directory?
Thanks for the help. I tried that. It does not seem to work.
One thing that might be affecting this is that the My Documents location on the machines is mapped to a network location.
One thing that might be affecting this is that the My Documents location on the machines is mapped to a network location.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to change Default TARGETDIR to User Directory?
... you could also try with a different user directory instead of My Documents location.
Regards
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: How to change Default TARGETDIR to User Directory?
I think I figured it out. Not sure how I didn't see this before, but I did this and it's giving me the result I want.
Thanks again for trying to help. I appreciate it.
Code: Select all
Get Folder Location System->Profiles Directory into PROFILESDIR
Set Variable TARGETDIR to $PROFILESDIR$\$TITLE$
Code: Select all
~InstallAware Clipboard Data~
~Get Folder Location~
~{52124D7F-F719-43C2-ACC6-E87AF1D0172C}~
~PROFILESDIR~
~19~
~FALSE~
~InstallAware Clipboard Data~
~Set Variable~
~{49FB1070-8740-4288-8DDB-4D116705D1D9}~
~TARGETDIR$MYAH$MYAH$FALSE~
~$PROFILESDIR$\$TITLE$~
Thanks again for trying to help. I appreciate it.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to change Default TARGETDIR to User Directory?
Dear Ristogod,
the funny thing is ... that I missed as well.
You are right, that is the one to use.
Regards
the funny thing is ... that I missed as well.
You are right, that is the one to use.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: JohnGaver, vaibhavopkey and 91 guests