Redirect a file created in Restricted access location
Hi All,
While launching the shortcut of the application , it's creating a log file in "c:\" , which is restricted location for the deployed machines. As a result of this , it throws an error when shortcut is launched . Please guide me in solving this problem by editing the msi so that i can redirect the log file to the application specific folder and give permission to that folder.
Thanks in advance
While launching the shortcut of the application , it's creating a log file in "c:\" , which is restricted location for the deployed machines. As a result of this , it throws an error when shortcut is launched . Please guide me in solving this problem by editing the msi so that i can redirect the log file to the application specific folder and give permission to that folder.
Thanks in advance
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
instedit
16 years ago
If it is possible to redirect the log file, I strongly suggest you don't redirect it to the application's installation folder, but rather some place like
"LocalAppDataFolder\app_name". This saves worrying about permissions, and is the "proper" place for this sort of data. Especially if you want to do things in the future such as run it in a Terminal Server session.
You are pretty much out of luck for redirecting if the app has "c:\" hardcoded as the log file location. Ring the authors and have severe words with them.
You could try setting the WkDir field of the Shortcut table entry (assuming that it is created via the Shortcut table).
To do this, ensure there exists Directory table entries such as
[font="courier new"]LocalAppDataFolder TARGETDIR .:APPLICA~1|ApplicationData
[font="courier new"]AppWkDir LocalAppDataFolder [font="courier new"][font="courier new"]AppNam[font="courier new"]~[font="courier new"]1|[font="courier new"]AppName
And then set the WkDir field to: AppWkDir.
Hope you have some success.
"LocalAppDataFolder\app_name". This saves worrying about permissions, and is the "proper" place for this sort of data. Especially if you want to do things in the future such as run it in a Terminal Server session.
You are pretty much out of luck for redirecting if the app has "c:\" hardcoded as the log file location. Ring the authors and have severe words with them.
You could try setting the WkDir field of the Shortcut table entry (assuming that it is created via the Shortcut table).
To do this, ensure there exists Directory table entries such as
[font="courier new"]LocalAppDataFolder TARGETDIR .:APPLICA~1|ApplicationData
[font="courier new"]AppWkDir LocalAppDataFolder [font="courier new"][font="courier new"]AppNam[font="courier new"]~[font="courier new"]1|[font="courier new"]AppName
And then set the WkDir field to: AppWkDir.
Hope you have some success.
Posted by:
AngelD
16 years ago
If Neil's suggestions does not apply you could always use ACT (Application Compatibility Toolkit) for redirection.
Windows Application Compatibility
http://technet.microsoft.com/en-us/desktopdeployment/bb414773.aspx
Windows Application Compatibility
http://technet.microsoft.com/en-us/desktopdeployment/bb414773.aspx
Posted by:
anonymous_9363
16 years ago
...and if the worst comes to the worst and you have to allow that behaviour, provided that the log file name is always the same, there's no reason why permissions couldn't be set for just that file.
Neil is right, though. Vendors need to be told in the strongest possible terms that such behaviour is totally unacceptable these days. If it's an older app designed for pre-NT OSs, there is likely to be a better-behaved alternative.
Neil is right, though. Vendors need to be told in the strongest possible terms that such behaviour is totally unacceptable these days. If it's an older app designed for pre-NT OSs, there is likely to be a better-behaved alternative.
Posted by:
prashanth
16 years ago
Posted by:
AngelD
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.