Accessing variables set using SET /U or SET /S

Dec 2, 2008
212
2
Canada
#1
How do you access variables set using SET /U or SET /S

I want to pass PID information between different TCC session.

For example:

session one:

SET /U S1PID=%_pid%

session two:

TASKEND /F %S1PID%

Craig
 
#2
cgunhouse wrote:

| How do you access variables set using SET /U or SET /S
|
| I want to pass PID information between different TCC session.
|
| For example:
|
| session one:
|
| SET /U S1PID=%_pid%
|
| session two:
|
| TASKEND /F %S1PID%

Combine the /E option with /U or /S to force the other sessions to see
the variable. However, that still does not make them accessible to the
parser, which you need to access the value. The method I found is to use
@EXECSTR[set /u s1pid]
which works correctly.
Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
the command GSET to set the global variable, and the function @GV[] to
retrieve its value.
--
HTH, Steve
 
Dec 2, 2008
212
2
Canada
#3
cgunhouse wrote:

| How do you access variables set using SET /U or SET /S
|
| I want to pass PID information between different TCC session.
|
| For example:
|
| session one:
|
| SET /U S1PID=%_pid%
|
| session two:
|
| TASKEND /F %S1PID%

Combine the /E option with /U or /S to force the other sessions to see
the variable. However, that still does not make them accessible to the
parser, which you need to access the value. The method I found is to use
@EXECSTR[set /u s1pid]
which works correctly.
Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
the command GSET to set the global variable, and the function @GV[] to
retrieve its value.
--
HTH, Steve
Yes, that works for me, thanks!

Craig
 
#4
On Wed, 20 Oct 2010 13:46:06 -0400, Steve Fábián <> wrote:

| Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
|the command GSET to set the global variable, and the function @GV[] to
|retrieve its value.

GSET and @GV use a proprietary registry key, HKCU\JPGlobal; that may be fine if
sharing is the only objective.

4UTILS also offers @GEV[name[,s|u|v|d]] to retrieve those set with SET s|u|v|d
(or others in the registry's four environment keys).