SETP usually fails with a 32 bit process

May 20, 2008
11,400
99
Syracuse, NY, USA
SETP with 32-bit processes usually fails. 4572 in devenv.exe (32-bit);

Code:
d:\tc25> setp 4572 temp
TCC: Not in environment "temp"

It does work occasionally.

Code:
v:\> setp 4572 temp
temp=z:\

Most of the time I can get it to work by first using SETP on a 64-bit process.

Code:
v:\> setp 4572 temp
TCC: Not in environment "temp"

v:\> setp 4572 temp
TCC: Not in environment "temp"

v:\> setp 4572 temp
TCC: Not in environment "temp"

v:\> setp 4572 temp
TCC: Not in environment "temp"

v:\> setp %_pid temp <===================== 64-bit process
temp=z:\

v:\> setp 4572 temp
temp=z:\

v:\> setp 4572 temp
temp=z:\

v:\> setp 4572 temp
temp=z:\
 
May 20, 2008
11,400
99
Syracuse, NY, USA
Most of the time I can get it to work by first using SETP on a 64-bit process.
In fact that's pretty reliable behavior ... SETP on a 32-bit process doesn't work until SETP has been used on a 64-bit process. Here are 4 newly-started instances of TCC.

1594585541268.png
 
May 20, 2008
11,400
99
Syracuse, NY, USA
There's something else going on here. After SETP on a 64-bit process, SETP on a 32-bit process seems to work, but apparently gives the wrong answer.

Now, devenv (32-bit) is PID 6784. In a new TCC, as in a previous post,

Code:
v:\> setp 6784 temp
TCC: Not in environment "temp"

v:\> setp %_pid temp
temp=z:\

v:\> setp 6784 temp
temp=z:\

But I believe that's wrong because

1. My PSET32.EXE gives

Code:
v:\> pset32 6784 temp
C:\Users\vefatica\AppData\Local\Temp

2. devenv is writing its temp files to C:\Users\vefatica\AppData\Local\Temp (confirmed with FOLDERMONITOR)

3. devenv was started by PowerPro.exe whose TEMP is C:\Users\vefatica\AppData\Local\Temp

Here's another test; it seems to show the same thing.

Code:
v:\> set junk=foo

v:\> setp 6784 junk
TCC: Not in environment "junk"

v:\> setp %_pid junk
junk=foo

v:\> setp 6784 junk
junk=foo

v:\> set junk=bar

v:\> setp %_pid junk
junk=bar

v:\> setp 6784 junk
junk=bar
 
Similar threads
Thread starter Title Forum Replies Date
R Documentation Help Nit with SETP Support 0
vefatica SETP? Support 7
rps Documentation Advanced directive link to tabcloseprompt & SETP correction Support 0
Joe Caverly SETP and 32-bit process Support 2
Joe Caverly Documentation SETP correction in help file Support 0
samintz COPY fails to copy from \\wsl$ Support 20
M Goto fails when a text endtext block precedes the code Support 5
S INPUT fails if the entered text contains pair of square brackets Support 6
B Request Manual Key fails Support 3
L TCC V22 installer fails signature validation Support 0
A Fixed v25 regression: Parameter expansion fails in piped commands Support 2
vefatica START /PGM "name with spaces.URL" fails Support 2
I zip /M fails to delete file after adding to zip file Support 2
D skip= in FOR /F fails Support 9
Joe Caverly Using a Directory Alias with @iniwrite fails Support 14
A WAD Output redirection to IF block fails with "unbalanced brackets" Support 7
E My echo full file name to the clipboard fails now. Support 2
A Fixed (CMD compat) START /D fails to recognize the switch option. Support 3
B MKLINK requires admin - fails silently. Support 1
D Fixed Take Command 21.0.29 fails – MSVCP140.dll missed Support 6
F Powershell call fails with "Scripting Integrator 2016 (PowerShell)" license error Support 9
fishman@panix.com Version 21.23 fails to install Support 4
D unzip fails to find valid license Support 3
StarliteLemming Fileread fails on Unicode file Support 10
D Upgrade from 19 to 19.10 fails Support 2
C Upgrade to v19.10.42 fails Support 5
D V19 fails to install on Win7-64bit, installer says: Support 2
bervin Webform fails on HTTPS Support 1
thedave Windows 10: Pinned taskbar fails Support 20
P MS VS2013 vsdevcmd.bat fails to run with tcmd 17 x64 Support 10
vefatica @REGQUERY with hostname fails Support 12
tmaynard Bug Typesafe Activator fails under Take Command shell Support 2
R Fixed Internal ZIP command fails to process multiple files Support 3
P Copying descript.ion file fails Support 8
S WAD FTP copy fails in 16.00.25 Support 24
S WAD KEYSTACK fails in TCC-64 Support 2
vefatica Files disappear in Explorer when DEL fails Support 6
T tcc /c "[...]" fails when run from third party terminal Support 11
C Latest TCMDx64 fails on XP Pro x64 Support 1
dcantor WAD dir "ftp:// ..." fails in TCC 15 Support 7
M WAD Copy command fails rather weirdly... Support 2
S WAD COPY from FTP site fails in 14.03.51 Support 9
M Updating environment variable from C++ fails erratically in version 14... Support 57
dcantor Take Command 14 release fails Support 6
S WAD "Mark Forums Read" fails Support 4
dcantor Fixed Take Command 14.0.20 fails Support 19
D Upgrade from b12 fails Support 5
scottb Toolbar filter by directory attribute /A:D fails Support 1
Stefano Piccardi IDE.exe start toobar button fails when % in script path Support 0
H Install fails and removes tcmd Support 4

Similar threads