How to change program execution path(BaseDirectory)

138 views
Skip to first unread message

Chanaka Priyadhakshitha

unread,
Oct 11, 2021, 2:57:33 PM10/11/21
to innosetup

Hi,

I have created setup with innosetup and after run the setup it is creating .exe file in the selected directory(C:\Program Files (x86\),
But,
When run the installed application, all other executable files (.dll, .db etc: )are creating in the Temp folder(C:\Users\UserName\AppData\Local\Temp\.net).

It is annoying because when clear the Temp files. it will gone all the saved application data and files. 

So is there any way to add another directory behalf of the Temp folder?


Thank you.

Gavin Lambert

unread,
Oct 11, 2021, 6:07:12 PM10/11/21
to inno...@googlegroups.com
Deploy the original application; don't deploy a published ClickOnce
wrapper. Those are intended only for apps that don't have an installer.

Also: never assume that you can save settings or data in the app's
folder. If you are prompting the user where to save files then default
to saving them in their Documents folder; if you are saving files
automatically then default to an app-specific subfolder of their
AppData\Roaming folder.

You can use Environment.GetFolderPath to get the full paths to these
folders.

Chanaka Priyadhakshitha

unread,
Oct 12, 2021, 12:15:20 PM10/12/21
to innosetup
Thank you very much. It worked.
Reply all
Reply to author
Forward
0 new messages