ZTree.com  | ZEN  | About...  

 Index   Back

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

By: Ryan       
Date: Sep 17,2017 at 22: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%?

303 views      
Thread locked
 

Messages in this Thread

 
94,426 Postings in 11,918 Threads, 348 registered users, 9 users online (1 registered, 8 guests)
Index | Admin contact |   Forum Time: Sep 18, 2019 - 5:56 pm EDT  |  Hits:28,649,221  (1,968 Today )
RSS Feed