Relocating INI files doesn't work

Found a serious/minor bug in PopTray? Tell me about it.

Moderators: KY Dave, jojobear99, Rdsok

Locked
AngusSF
First Timer
Posts: 3
Joined: Fri Mar 26, 2010 9:44 pm

Relocating INI files doesn't work

Post by AngusSF » Fri Mar 26, 2010 10:28 pm

Been using PopTray for a day, nice program. However, I'm having trouble saving my settings. The help file says I can relocate the INI files as follows:
  • By using the command-line "C:\Program Files\PopTray\PopTray.exe" "%USERPROFILE%" ...
However, when I do this, it doesn't work. As you can see in this screen-print image showing the Help File page, a DOS window showing the directory exists, the Start -> Run window I used to start PopTray, and what happens when I try to save RULES.INI:

Image

Since the target directory "%userprofile%\PopTray" exists and the command-line used to start PopTray was
  • D:\Programs\PopTray\PopTray.exe "%userprofile%\PopTray"
one would expect PopTray to try to save its INI file in "%userprofile%\PopTray". However, this fails with an error message that says
  • Cannot create file "C:\Documents\Rules.ini"....
I also tried
  • D:\Programs\PopTray\PopTray.exe "%userprofile%"
which failed with the identical error message. And when I exit from PopTray, I get a "Cannot write C:\Documents\Poptray.ini" error.

PopTray is clearly not honoring the quotes around the quoted "%userprofile%" string, it's truncating it at the first space.

FWIW, in Win7 the rules for where you store INI files have changed. You MAY NOT locate user-writable content like INI files in the program directory, you MUST locate user-writable content elsewhere. Global u-w content (writable by all users) is in %progdata%), but I recommend you modify PopTray so that the DEFAULT location of the INI files is "%userprofile%\PopTray". (I wouldn't use just "%userprofile%" because of the possible conflict with other programs for a common filename like RULES.INI.)

[Cross-posted in Feature Requests -- I had an existing message there, see note at the bottom of it.]
--
Angus S-F

User avatar
Rdsok
PopTray Family
Posts: 1352
Joined: Fri Mar 19, 2004 11:36 pm
Location: Norman, Oklahoma USA
Contact:

Post by Rdsok » Sat Mar 27, 2010 3:03 am

Poptray was not developed for Win7 but it would work if done properly... Reneir ( at this time ) has no plans to do further developement.

You may want to check what your %USERPROFILE% variable is actually set to ... that should be in C:\USERS\[Your username] in Windows Vista and 7

AngusSF
First Timer
Posts: 3
Joined: Fri Mar 26, 2010 9:44 pm

Post by AngusSF » Sat Mar 27, 2010 6:05 am

Rdsok wrote:Poptray was not developed for Win7 but it would work if done properly... Reneir ( at this time ) has no plans to do further developement.

You may want to check what your %USERPROFILE% variable is actually set to ... that should be in C:\USERS\[Your username] in Windows Vista and 7

Perhaps I should have kept the Win7 comments in a separate message so as not to confuse the issure. In Win7 %USERPROFILE% would be that, but in XP the %USERPROFILE% variable defaults to "USERPROFILE=C:\Documents and Settings\[username]" and the embedded space is breaking PopTray.
--
Angus S-F

User avatar
Rdsok
PopTray Family
Posts: 1352
Joined: Fri Mar 19, 2004 11:36 pm
Location: Norman, Oklahoma USA
Contact:

Post by Rdsok » Sat Mar 27, 2010 7:47 am

I didn't see the previously but...

Look very close at your screenshot where you show the command-line you have... you are missing a " quote mark right after ..\Poptray.exe

AngusSF
First Timer
Posts: 3
Joined: Fri Mar 26, 2010 9:44 pm

Post by AngusSF » Sat Mar 27, 2010 10:39 pm

Rdsok wrote:I didn't see the previously but...

Look very close at your screenshot where you show the command-line you have... you are missing a " quote mark right after ..\Poptray.exe
I don't need a quote mark there, the path to PopTray is D:\Programs\PopTray\PopTray.exe.
--
Angus S-F

User avatar
Rdsok
PopTray Family
Posts: 1352
Joined: Fri Mar 19, 2004 11:36 pm
Location: Norman, Oklahoma USA
Contact:

Post by Rdsok » Sun Mar 28, 2010 1:16 am

Not to argue but just to point a few things out just in case...

Normally, on XP and in Win7 the default program folder is C:\Program Files\Poptray ( again, this is the default being on C drive and the programs also being located in their default locations in Program Files ).

The error you mentioned would be explained if there is a space in the folder path name and it would also explain why on my system it works... and on yours you had the error you saw. If I'm correct and your path to the program is D:\Program Files\Poptray\Poptray.exe .... you would then have the reason that you are seeing the error... ie a missing quote tag.

If none of the above applies to your situation.. so be it. But in that case you'd need to find out what is not properly set with your Windows in that case and I'd have no other suggestion to provide.

User avatar
KY Dave
Not the Developer
Posts: 1599
Joined: Thu Mar 14, 2002 7:29 pm
Location: Burkesville, KY. U.S.A.
Contact:

Post by KY Dave » Sun Apr 11, 2010 2:09 pm

KY Dave wrote:I've started using PopTray on a new PC with Windows Seven installed. It works better when setup in the PUBLIC section of the hard drive, NOT in the PROGRAM section. This location lets PopTray write to the directory it is placed inside, where the PROGRAM section does not.
viewtopic.php?t=3791

If you can't work it out using the command line,
the simple solution is to create a directory for PopTray in the PUBLIC USER directory. PopTray will function in Win 7 when installed there.
KY Dave

Family Blog
You can STOP SPAM using PopFile and PopTray.

Locked

Who is online

Users browsing this forum: No registered users and 3 guests