ZTree.com  | ZEN  | About...  

 Index   Back

[Q] batch anomalies related with SID and >> operator   [Q]

By: Ryan       
Date: Sep 18,2017 at 02:01
In Response to: [Q] batch anomalies related with SID and >> operator (Peter Shute)

yes, it shows them in echo in xp and win 8.1 and win 10

but win 8.1 and win 10 refused to find it and put it in FOR /F "DELIMS=" form.

when i tried to remove all windows shells and moved them to a ztree's shells like SHELL-IMAGE.BAT, i ended up finding a SID reg, which is THE activation key, without this, no matter how beautifully you write your shell registry, windows will not execute the shell's file extensions

it is so odd to me, it perfectly works in XP and doesnt work in the new OS's at all.

without this, i have to manually feed the SID in reg, even that may not work in a batch level that i havent tried yet.







> >
> > anomaly 1
> > AA=
> > @ECHO OFF
> > SET SID1=WMIC useraccount where name="%%USERNAME%%" get sid
> > ECHO %SID1%
> > FOR /F "DELIMS=" %%%V IN ('"%SID1%"') DO SET SID2=%%%V
> > ECHO %SID2%
> > PAUSE
> >
> > AA= works in XP, but it doesnt work in 8.1 and probably not in win10.
> > so if your variable is the same as the SID (secret identifier), does
> > these NEW OS's reject the variable?
>
> SID stands for Security Identifier. I've never used the WMIC command
> before, it looks useful.
>
> I can't imagine any of those other commands care if variables contain
> a SID or not. Have you compared the output of WMIC useraccount where
> name="%%USERNAME%%" get sid
> from Win 10 and XP? Does each show the same thing for echo %sid1%?

1,078 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 80 users online (0 registered, 80 guests)
Index | Admin contact |   Forum Time: Mar 29, 2024 - 11:32 am UTC  |  Hits:62,403,848  (18,634 Today )
RSS Feed