Portable and Non-Portable in the same program

Discuss anything related to portable freeware here.
Post Reply
Message
Author
flector
Posts: 51
Joined: Sun Jul 23, 2006 10:45 am

Portable and Non-Portable in the same program

#1 Post by flector » Mon Mar 21, 2011 11:45 am

Every now and then, someone will try to install a portable program into C:\Program Files\SomeProgram. On Vista and Win7, that is a bad idea because it takes elevated privileges to write to that folder.

I wonder if it would be useful to provide the option of writing configuration files to %AppData%\SomeProgram instead of the folder the .exe file is located in...

User avatar
SYSTEM
Posts: 1968
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Portable and Non-Portable in the same program

#2 Post by SYSTEM » Mon Mar 21, 2011 12:42 pm

Why not put the program itself into %AppData%\SomeProgram?
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
JohnTHaller
Posts: 650
Joined: Wed Feb 10, 2010 4:44 pm
Location: New York, NY
Contact:

Re: Portable and Non-Portable in the same program

#3 Post by JohnTHaller » Mon Mar 21, 2011 2:02 pm

The best option is for the portable installer or the application (or launcher if it uses one) to inform the user of the error on launch. Many of our apps test for write access on launch automatically and will inform the user if they fail. We'll be adding bits to our portable installers to warn users of the issues of using Program Files for portable software (due to these issues plus the fact that many apps detect when they are in Program Files and assume they are locally installed). For users wanting to run locally, we recommend installing apps to C:\PortableApps\. That way if they move later, it's just as easy to just move that folder to a new drive internal or external.
PortableApps.com - The open standard for portable software | Support Net Neutrality

flector
Posts: 51
Joined: Sun Jul 23, 2006 10:45 am

Re: Portable and Non-Portable in the same program

#4 Post by flector » Mon Mar 21, 2011 2:26 pm

I like the idea of testing if the app is running from CSIDL_PROGRAMS and putting up a warning dialog when needed.

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

Re: Portable and Non-Portable in the same program

#5 Post by m^(2) » Tue Mar 22, 2011 12:09 am

I think that app should just work. That is - the installer should ensure all rights that it requires are in place.

User avatar
JohnTHaller
Posts: 650
Joined: Wed Feb 10, 2010 4:44 pm
Location: New York, NY
Contact:

Re: Portable and Non-Portable in the same program

#6 Post by JohnTHaller » Tue Mar 22, 2011 10:13 am

m^(2): I don't think an installer can alter Vista/7's requirement that you must show a UAC prompt to alter anything in Program Files, so things installed to Program Files can't just work. Or did you mean the installer or launcher or app should warn you when it can't work?
PortableApps.com - The open standard for portable software | Support Net Neutrality

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

Re: Portable and Non-Portable in the same program

#7 Post by m^(2) » Tue Mar 22, 2011 11:05 am

Are you sure about it?
I know of some program that writes in it's own folder and installation directory used to point to program files, yet I don't see users screaming. I remember such things soon after Vista arrived. Installer was modified to alter directory permissions and it worked.
It may have been modified to install elsewhere or store settings elsewhere with the advent of Vista 2, but I think I would notice. I don't use the program, but I'm a moderator of it's forum.

Post Reply