News for hackers. Stuff that matters.
Re:Kinda like apt-get, but for Windows by nfg on Wednesday February 06, 2013 @06:02AM (#5175808)
IME "root of C: drive" default install location is often a sign that software has bugs when run from paths containing space characters.
Re:Kinda like apt-get, but for Windows by e40 on Wednesday February 06, 2013 @10:30AM (#5176817)
If the app writes files into the installation, then you can't install in "Program Files", because Windows will capture and redirect those writes.

Cygwin goes to c:\cygwin because it's normal for all sorts of files in that directory to be written/changed. If it were in "Program Files", it wouldn't work at all.

To call this a bug is just absurd. It's Microsoft that changed the notion of what was valid and forced everyone else to conform. Some software isn't able to conform.

Re:Kinda like apt-get, but for Windows by drzaiusapelord on Wednesday February 06, 2013 @12:33PM (#5177674)
Well written software follows guidelines from the NT age (%APPDATA%, %PROGRAMFILES%, etc). I have no idea why people still think its the dos age of just making arbitrary folders on the root. Heck, this is currently a huge problem in android. The root of my /sdcard is a mess. Are we forced to relive every mistake with every new platform?

I have no idea what capturing and redirecting writes mean. If you want to write, write somewhere you have permission to write to. I deploy software and sometimes need to changeup permissions for badly written software that likes to write to its install folder. I don't know why people excuse developer laziness like this. Imagine if your linux configs were written to /bin/ instead of /etc/ or stuff that should be in your profile is written to /sbin/ or if your logs were put in /etc/. Thats the linux equivalant of what lazy developers do to Windows.

Re:Kinda like apt-get, but for Windows by dkl on Wednesday February 06, 2013 @02:31PM (#5178292)
I have no idea what capturing and redirecting writes mean.

All explained here:

http://superuser.com/questions/384107/why-cant-i-edit-a-prog...

Re:Kinda like apt-get, but for Windows by drzaiusapelord on Wednesday February 06, 2013 @03:24PM (#5178572)
Yeah that's still a permissions issue. The user/account did not have write permissions so instead of just erroring out its trying to preserve legacy software by taking the change and ignoring it silently. Who knows why MS chose this path but the fault is still on the installer.

The fix is either use the proper locations for app data OR change permissions on that folder. its not some insurmountable hurdle that forces you to use weird locations. If permissions were correct then it would be fine. Heck, install Apache on windows. Everything just works in the proper locations because they didn't half ass everything.

Its also worth mentioning that this change came along when Vista was released; prior to that this didn't happen, yet crappy installers pulled the same shit: install to c:\, attempt to write to c:\windows\temp, etc and other DOS/Win95 legacy habits.

Ironically, Vista helped fix all this. Now I see installers for open source or community projects uses proper locations much more often than not. I guess people got sick of the UAC prompts and corporate admins were complaining about how all these arbitrary writes weren't compatible with their limited users.

Re:Kinda like apt-get, but for Windows by Nilzor on Wednesday February 06, 2013 @11:22AM (#5177181)
Apps should write data files to %APPDATA%, not Program Files where the executables shall reside. The only excuse for installing to c:\chocolatey is lazyness
Re:Kinda like apt-get, but for Windows by Shorel on Wednesday February 06, 2013 @12:37PM (#5177694)
In this case, Chocolatey's data files are actually program files for the rest of the system.

It's just a simple consequence to the fact that Chocolatey is not 'a program' with clearly defined 'data files', but a general purpose software manager (and one that should really be a part of Windows).

The Von Neumann architecture won over the Harvard architecture for a reason. You should learn about it.

Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @02:29PM (#5178276)
> The Von Neumann architecture won over the Harvard architecture for a reason

And then we placed restrictions on it for another reason: security.

See Data Execution Prevention http://en.wikipedia.org/wiki/Data_Execution_Prevention Which, like these file system permissions, attempts to divide storage into things that you can write and things that you can execute, and the two only meeting in special cases.

You're saying that Chocolatey needs elevated privileges to do it's special thing. Sure. Then it shouldn't be designed around the needs of users who can't get those permissions.

Re:Kinda like apt-get, but for Windows by dkl on Wednesday February 06, 2013 @02:32PM (#5178306)
This is just plain naive. See Shorel's comment, and to that I'll add:

That is YOUR definition of where to write data files. Not mine and certainly not everyone's idea. Saying that all apps should fit this model is just absurd.

Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @03:05PM (#5178476)
> That is YOUR definition of where to write data files

Well, Him and the designers of the operating system.

Re:Kinda like apt-get, but for Windows by dkl on Wednesday February 06, 2013 @04:50PM (#5179063)
My point is they changed the definition. It wasn't always that way.
Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @05:59PM (#5179454)
You'd prefer that nothing changed? OSs evolve. Deal with it.
Re:Kinda like apt-get, but for Windows by chayesfss on Wednesday February 06, 2013 @09:00AM (#5176323)
like c:\oracle?
Re:Kinda like apt-get, but for Windows by mahmoudhossam on Wednesday February 06, 2013 @09:59AM (#5176644)
and C:\Python27
Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @10:26AM (#5176796)
For Python what may be happening is a good piece of software that is not native to Windows. It works well enough on Windows, but the windows installer is very low on the developers' priorities and expertise. So the windows install experience ends up an afterthought that just barely works.

It also shows how anyone claiming "my tool is special, unlike others it's better to install this under C:\" is not showing good neighbourliness. It just encourages others to make the same mistake.

For Oracle, that probably also holds ... except maybe for the "good software" part.

Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @07:19AM (#5175982)
Yep. That's old-school though, you don't see much of it these days.
Re:Kinda like apt-get, but for Windows by pjmlp on Wednesday February 06, 2013 @08:42AM (#5176247)
I never understood what is so hard in treating the space as just another character.
Re:Kinda like apt-get, but for Windows by j-kidd on Wednesday February 06, 2013 @08:46AM (#5176260)
Because space is not just another character. Space separates args.
Re:Kinda like apt-get, but for Windows by ygra on Wednesday February 06, 2013 @09:51AM (#5176604)
But an installer talking to the operating system shouldn't need to separate arguments anywhere.
Re:Kinda like apt-get, but for Windows by laumars on Wednesday February 06, 2013 @10:18AM (#5176751)
Which is why escape characters and quotations were invented
Re:Kinda like apt-get, but for Windows by jfb on Wednesday February 06, 2013 @12:07PM (#5177522)
It is an abject failing of software that perfectly reasonable characters are barred from filenames.
Re:Kinda like apt-get, but for Windows by pjmlp on Wednesday February 06, 2013 @11:04AM (#5177035)
which is why most arguments tend to have a way to be recognized like -, -- or /
Re:Kinda like apt-get, but for Windows by lotyrin on Wednesday February 06, 2013 @03:06PM (#5178478)
Those are how one differentiates flags from arguments, which is a separate problem.
Re:Kinda like apt-get, but for Windows by pjmlp on Thursday February 07, 2013 @01:29AM (#5180865)
Kind of.

If your flag is for a path, you can assume everything up to the next flag is a path name.

myprog -filename here is my path with spaces -another_flag

Of course this depends on how the shell gives the arguments to the program.

On the other hand, there is no excuse why some GUI programs cannot handle spaces.

Re:Kinda like apt-get, but for Windows by lotyrin on Thursday February 07, 2013 @04:47PM (#5184714)
cp path1 path2

So, that's just one file?

Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @10:33AM (#5176833)
Treating the space as just another character in a path means that sometimes paths have to be placed inside quotes so the space isn't taken for the end of a commandline arg. Some old software didn't do that.
Re:Kinda like apt-get, but for Windows by Nilzor on Wednesday February 06, 2013 @11:16AM (#5177116)
Chocolatey is not old software
Re:Kinda like apt-get, but for Windows by SideburnsOfDoom on Wednesday February 06, 2013 @11:36AM (#5177300)
No, it does not have that excuse.
Re:Kinda like apt-get, but for Windows by darkchasma on Wednesday February 06, 2013 @01:45PM (#5178048)
But the packages it installs may.
Re:Kinda like apt-get, but for Windows by negativity on Wednesday February 06, 2013 @12:53PM (#5177773)
The tilde file names in windows harken back to ye olde days of MSDOS, where file names were only allowed to be 8 characters long, and the extension was only allowed to be a dot followed by three characters (aka: the "eight-dot-three" file naming convention).

Like, if someone generated several thousand files, all named: "New Text Document.txt"

In the background, some versions of Windows will also record an alternate file name for ye olde backwards compatibility, such as:

NEWTEX~1.TXT

NEWTE~10.TXT

NEWT~100.TXT

NEW~1000.TXT

NE~10000.TXT

N~100000.TXT

It's not really about the space characters, so much as it is about length constraints from back when 640KB should've been more memory than anyone will ever need.

Re:Kinda like apt-get, but for Windows by pizza on Wednesday February 06, 2013 @12:21PM (#5177603)
Couldn't you do PROGRA~1 for "Program Files" or PROGRA~2 for "Program Files (x86)"?
Re:Kinda like apt-get, but for Windows by niggler on Wednesday February 06, 2013 @01:27PM (#5177947)
If there were another directory like "Program Aardvarks", then the DOS names wouldn't necessarily be PROGRA~1 and PROGRA~2