.net - C# Cannot write to Application.ExecutablePath, some boxes i can some i cannot? uninstall from this -


so have been writing to

environment.specialfolder.applicationdata  

this data file, upon uninstall needs deleted. using innos setup build installer. works great me. data file hangs out in above path , cause when used try write to

application.executablepath 

certain boxes tested on throw nasty error @ me trying write data there. research , somehow not writable , how came environment.specialfolder.applicationdata

that why data file resides in specialfolder.applicationdata. trouble if user uninstalls , reinstalls need file gone. might short coming of knowledge of innos cannot figure out how know file tell innos that.

so thought had clever solution: innos can run file when done uninstalling, had program create file "uninstalldata.bat" says:

del "the file in special folder application data path" 

and wrote out drumroll

application.executablepath  

(yes while in development , had forgot was't doable.)

so of course square one, need write file path innos knows {app} , need able delete data file in specialfolder... don't care how need file gone.

are there other environment. or application. approches have missed? maybe somewhere viewable uninstaller , can written to?

as aside, not sure why box develop on can write application folder no issue, cannot on other boxes... weird.

any input great sorta lost how crack nut.

the environment location in user profile. if there multiple users on machine, , run application copy of file in each profile.

the path depends on os.

regardless, current user's app data location pointed %appdata% , %localappdata%. these windows environment variables should available within innos.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -