Tag Info

Hot answers tagged

5

When defining variables in PowerShell, single quotes (') mean you want the literal version of the string. Use double-quotes (") if you want to allow variable expansion: PS C:\> $a = "hello" PS C:\> $a hello PS C:\> $b = "$a world!" PS C:\> $b hello world! More info: Single Quotes vs. Double Quotes in PowerShell: What's the Difference? ...


3

In bash (or ksh), you can use the indirection syntax ${!var} to reference the variable whose name is the value of $var. It has to be the complete name, so you have to do it like this: for j in {1..2}; do # This could have been declare instead of export if you don't need # to export the variable. export var${j}=$j varname=var$j echo ...


2

This is not possible with your current function, as soon as you background it with & it takes a copy of the process stack and leaves. There is no way for the changes to your stack to propagate to the job's copy unless you explicitly build that functionality, and it's similarly impossible to get changes to the function's stack into your current stack. ...


2

Just realised as I'd just installed python that there would be a system restore point from that, so I rolled back to that point. Job done After the restore, the two paths do appear to be different. When I run echo %PATH% in the command prompt The result is the system path concatenated with the user path.


1

You don't actually need the user name to put something in their home structure. Simply starting ~/ will direct it to their home, so ~/Library/ will go to the current user's [Boot Drive]/Users/[User Name]/Library/. If you need to install for all users, use /Library/ instead. I guess it's the equivalent of Windows' %appdata%/ If you really need the ...


1

To change from within Windows, try the following: Pin PowerShell to the taskbar. Right click the PowerShell icon on the taskbar. Right click 'Windows PowerShell' and select 'Properties'. Within the 'Properties' window, go to the 'Shortcut' tab and change the 'Start in:' field to your desired starting directory. (Example: C:\Users\username\Desktop). Click ...


1

If you put in in BAT file you can do something like that: setx path "%%path%%;c:\drive\fr;c:\drive\installs\7z" see the dobule "%" It is worked for me!


1

The following steps should help: Break out your status line configuration into two different files: one configured with the colors you want for the dark theme, and another with the colors you want for the light theme. Save those files in your home directory (I made a .tmux directory and they live there) Add something like the following to your ...


1

In fact, you do not need all the environment variables for each the instance SQL Server. And well, if you check the environment variables needed to install and run queries or tasks. However, the problem can be solved directly. SET App32=c:\Program Files (x86)\ SET App64=c:\Program Files\ SET SQL32=%App32%Microsoft SQL Server\ SET SQL64=%App64%Microsoft ...


1

I don't know why it didn't work, but I re-installed fontforge to a different directory (with no spaces) and it seems to work now.


1

After a bit of trial and error, I discovered that these environment variables are the additional ones reported by SET on my Windows 8.1 system: ALLUSERSPROFILE APPDATA CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 COMPUTERNAME HOMEDRIVE HOMEPATH LOCALAPPDATA LOGONSERVER ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 PROMPT PUBLIC ...


1

You can always query the registry values directly: for /f "skip=2 tokens=2*" %a in ('reg query HKCU\Environment /v PATH') do @echo %b for /f "skip=2 tokens=2*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH') do @echo %b



Only top voted, non community-wiki answers of a minimum length are eligible