pik not updating path in Windows 7

403 views
Skip to first unread message

yermej

unread,
Jun 25, 2011, 6:55:54 PM6/25/11
to discu...@googlegroups.com
I'm using the latest version of pik (0.3.0.pre) on Windows 7 Ultimate. Pik seems to work correctly except for adding/changing my path. The below results are the same whether I'm running cmd.exe as a regular user or an administrator. I installed via the .msi. Is there a step I missed?

C:\Users\user>pik -V
pik 0.3.0.pre on Microsoft Windows [Version 6.1.7601]
by Gordon Thiesfeld (gthie...@gmail.com)

C:\Users\user>pik ls -v
   ruby-1.8.7-p330
        version: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
        path: C:\Users\user\.pik\rubies\ruby-1.8.7-p330\bin

   ruby-1.9.2-p136
        version: ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
        path: C:\Users\user\.pik\rubies\ruby-1.9.2-p136\bin

C:\Users\user>pik use 1.8.7

C:\Users\user>pik info
pik 0.3.0.pre on Microsoft Windows [Version 6.1.7601]
by Gordon Thiesfeld (gthie...@gmail.com)


Pik info will not work unless there is a version of ruby in the path.

You can use pik use to add one.

C:\Users\user>echo %PATH%
C:\pik\;C:\Program Files\ImageMagick-6.6.9-Q16;C:\Windows\system32;C:\Windows;C:
\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Fi
les\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\1
00\DTS\Binn\;c:\lame\;C:\Program Files\QuickTime\QTSystem\


Luis Lavena

unread,
Jun 27, 2011, 4:49:59 PM6/27/11
to pik help and suggestions
Hello,

On Jun 25, 7:55 pm, yermej <yer...@gmail.com> wrote:
> I'm using the latest version of pik (0.3.0.pre) on Windows 7 Ultimate. Pik
> seems to work correctly except for adding/changing my path. The below
> results are the same whether I'm running cmd.exe as a regular user or an
> administrator. I installed via the .msi. Is there a step I missed?
>

Can you tell us if anything is added to your autorun?

REG QUERY "HKCU\Software\Microsoft\Command Processor"
REG QUERY "HKLM\Software\Microsoft\Command Processor"

Also, can you tell us what is the value of %HOME%, %HOMEDRIVE%,
%HOMEPATH% and %USERPROFILE% environment variables?

Did you install the MSI with admin rights?

Does pik.bat exist in C:\pik along with pik_runner.exe?

--
Luis Lavena

yermej

unread,
Jun 28, 2011, 8:09:42 PM6/28/11
to discu...@googlegroups.com
On Monday, June 27, 2011 3:49:59 PM UTC-5, Luis Lavena wrote:

Can you tell us if anything is added to your autorun?

I'm not sure where to look for this. I ran msconfig and there's nothing related to pik under the Startup tab.
 
C:\Users\user>reg query "HKCU\Software\Microsoft\Command Processor"

HKEY_CURRENT_USER\Software\Microsoft\Command Processor
    CompletionChar    REG_DWORD    0x9
    DefaultColor    REG_DWORD    0x0
    EnableExtensions    REG_DWORD    0x1
    PathCompletionChar    REG_DWORD    0x9

C:\Users\user>reg query "HKLM\Software\Microsoft\Command Processor"

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
    CompletionChar    REG_DWORD    0x40
    DefaultColor    REG_DWORD    0x0
    EnableExtensions    REG_DWORD    0x1
    PathCompletionChar    REG_DWORD    0x40
 

Also, can you tell us what is the value of
 
%HOME%
This is not defined on my system.
 
%HOMEDRIVE%,
 C:

%HOMEPATH%
 \Users\user

%USERPROFILE%
 C:\Users\user
 
Did you install the MSI with admin rights?

On the initial install I did not. During that installation I allowed elevated privileges when requested. I also just uninstalled pik and then reinstalled with admin rights and there was no change.
 
Does pik.bat exist in C:\pik along with pik_runner.exe?
 
Yes. Those are both there along with pik.ps1 and 7za.exe.

Thanks for your help.

Jeremy

Luis Lavena

unread,
Jul 4, 2011, 12:15:44 PM7/4/11
to pik help and suggestions
On Jun 28, 9:09 pm, yermej <yer...@gmail.com> wrote:
>
> > Did you install the MSI with admin rights?
>
> > On the initial install I did not. During that installation I allowed
>
> elevated privileges when requested. I also just uninstalled pik and then
> reinstalled with admin rights and there was no change.
>

And you used pik in an elevated privileges command prompt also? or
just during installation?

> > Does pik.bat exist in C:\pik along with pik_runner.exe?
>
> Yes. Those are both there along with pik.ps1 and 7za.exe.
>

Can you paste the contents of pik.bat here? it should read something
like this:

@ECHO OFF
"%~dp0pik_runner.exe" "%~f0" %*

IF "%PIK_HOME%"=="" (
IF EXIST "%HOME%\.pik\pik_run.bat" (call "%HOME%\.pik\pik_run.bat")
) ELSE (
IF EXIST "%PIK_HOME%\pik_run.bat" (call "%PIK_HOME%\pik_run.bat")
)

As you can see from that, either %HOME% or %PIK_HOME% needs to be set.
I presume inside %USERPROFILE%\.pik there will be a pik_run.bat file
which contains the gem activation commands but is not working.

If you set HOME=%USERPROFILE%

Does that work?

--
Luis Lavena

yermej

unread,
Jul 5, 2011, 8:56:44 PM7/5/11
to discu...@googlegroups.com
On Monday, July 4, 2011 11:15:44 AM UTC-5, Luis Lavena wrote:
On Jun 28, 9:09 pm, yermej <yer...@gmail.com> wrote:
>
> > Did you install the MSI with admin rights?
>
> > On the initial install I did not. During that installation I allowed
>
> elevated privileges when requested. I also just uninstalled pik and then
> reinstalled with admin rights and there was no change.
>

And you used pik in an elevated privileges command prompt also? or
just during installation?

I had tried it in all combinations of installing with(out) elevated privileges and running with(out) elevated privileges.
 
If you set HOME=%USERPROFILE%

Does that work?

This fixed the problem. Everything seems to work fine now. Thanks very much for your help.

Jeremy
Reply all
Reply to author
Forward
0 new messages