- By using the command-line "C:\Program Files\PopTray\PopTray.exe" "%USERPROFILE%" ...
Since the target directory "%userprofile%\PopTray" exists and the command-line used to start PopTray was
- D:\Programs\PopTray\PopTray.exe "%userprofile%\PopTray"
- Cannot create file "C:\Documents\Rules.ini"....
- D:\Programs\PopTray\PopTray.exe "%userprofile%"
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.]