This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: write logfile in AllUsers (Appdata)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 23, 2010
02:25 AM
write logfile in AllUsers (Appdata)
Hi,
I want to write my log file in the AllUsers Profile or AllUsers\AppData. I cannot found a working variable for it to pass through CmdLine to setup.exe.
I know that I can use /LI "%WINDIR%\MyApp.install.log" (for Windows Dir) or /LI "%UserProfile%\pCon.planner.6.install.log" (for User Profile).
But how can I adress AllUser Profile or the AllUserAppData?
Thanks for any help! 🙂
I want to write my log file in the AllUsers Profile or AllUsers\AppData. I cannot found a working variable for it to pass through CmdLine to setup.exe.
I know that I can use /LI "%WINDIR%\MyApp.install.log" (for Windows Dir) or /LI "%UserProfile%\pCon.planner.6.install.log" (for User Profile).
But how can I adress AllUser Profile or the AllUserAppData?
Thanks for any help! 🙂
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 23, 2010
04:59 AM
CommonAppDataFolder Property
The CommonAppDataFolder property is the full path to the file directory containing application data for all users.
The CommonAppDataFolder property is the full path to the file directory containing application data for all users.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 23, 2010
05:26 AM
Ah thank you girishkatti! 🙂
But unfortuneately I cannot use this in the commandline.
If I set /LI "%CommonAppDataFolder%\MyApp.install.log" in the setup.ini in [Startup] Section and CmdLine Key I always get the MSI Error that the logfile cannot be created. If I use %UserProfile% instead of %CommonAppDataFolder% it works - but I need the log file in the AllUsers file directory because there it is accessible for all Users in case of support issues.
But unfortuneately I cannot use this in the commandline.
If I set /LI "%CommonAppDataFolder%\MyApp.install.log" in the setup.ini in [Startup] Section and CmdLine Key I always get the MSI Error that the logfile cannot be created. If I use %UserProfile% instead of %CommonAppDataFolder% it works - but I need the log file in the AllUsers file directory because there it is accessible for all Users in case of support issues.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 23, 2010
11:53 PM
try passing the following command to CmdLine
/LI "%ALLUSERSPROFILE%\Application Data\MyApp.install.log"
It did work for me.
/LI "%ALLUSERSPROFILE%\Application Data\MyApp.install.log"
It did work for me.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2010
02:13 AM
Again thank you very much girishkatti123 that you are the one who tries to help me 🙂 .
Your suggestion works fine, but sdaly not on a german XP where the CommonAppDataFolder Name is AllUsers\Anwendungsdaten...
So if there is no variable usable for this folder in the commandline then I will not be able to adress this folder in a multi language setup.
Another Problem is that I cannot create a new folder like %ALLUSERSPROFILE%\MyCompany\MyApp.log.
Does anyone have other suggestions? Where should I write my installation.log, that is it accessible for all users? Currently we write into WINDIR, but this it not a good idea for some reasons...
Your suggestion works fine, but sdaly not on a german XP where the CommonAppDataFolder Name is AllUsers\Anwendungsdaten...
So if there is no variable usable for this folder in the commandline then I will not be able to adress this folder in a multi language setup.
Another Problem is that I cannot create a new folder like %ALLUSERSPROFILE%\MyCompany\MyApp.log.
Does anyone have other suggestions? Where should I write my installation.log, that is it accessible for all users? Currently we write into WINDIR, but this it not a good idea for some reasons...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2010
02:52 AM
One way is to create a seperate component for different language.
Condition these component based on your OS language using SystemLanguageID to create the log files in AllUsersFolder.
One more way to check the ALLUSERPROFILE folder
Goto Cmd type set. You will get the environment variable. Create the folder you need to install the log file using OnBegin() Funtion.
Condition these component based on your OS language using SystemLanguageID to create the log files in AllUsersFolder.
One more way to check the ALLUSERPROFILE folder
Goto Cmd type set. You will get the environment variable. Create the folder you need to install the log file using OnBegin() Funtion.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2010
07:56 AM
Sorry, but the first approach with the component I don't understand. I know how to install a component based on ProductLanguage, but what should this has to do with logfile? Components are installed later in installation I thought.
The second solution is a great idea that I understand. I never used the OnBegin Function, because I didn't know that it will be executed before everything else . I will try to implement what I need: get ALLUSERPROFILE and create MyCompany directory within - sounds trivial.
But writing a log in the CommonAppDataFolder\MyCompany will not be able with the second approach.
The second solution is a great idea that I understand. I never used the OnBegin Function, because I didn't know that it will be executed before everything else . I will try to implement what I need: get ALLUSERPROFILE and create MyCompany directory within - sounds trivial.
But writing a log in the CommonAppDataFolder\MyCompany will not be able with the second approach.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2010
01:58 AM
Could somebody help me with this problem.
How can I create a Folder in AllUsers directory before the logging is started?
OnBegin can't be used since IS12 and a custom action (FirstAction) is too late because loggin already startet.
Or tell me another place where do you write your logfiles?
How can I create a Folder in AllUsers directory before the logging is started?
OnBegin can't be used since IS12 and a custom action (FirstAction) is too late because loggin already startet.
Or tell me another place where do you write your logfiles?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2010
04:37 AM
Or different questioned: Is there a MSI CommandLine Variable that points to [COMMONAPPDATA] like %APPDATA% for current user?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 16, 2010
02:09 AM
As far as I know, there is no predefined environment variable for CommonAppDataFolder/CSIDL_COMMON_APPDATA. I'm also interested in the alternatives for your question.