August 7, 200521 yr Code deleted, please see the updated version. Edited August 9, 200521 yr by Yzöwl
August 7, 200521 yr I've just thought, if you have spaces in your UserProfile path, ulike my machines, there may be a problem, I'll alter the above and earlier posts to suit.<Edit>Done, hope it helps!</Edit> Edited August 7, 200521 yr by Yzöwl
August 7, 200521 yr Author Let's give it a shot and see SID not foundHmm this is really strangeHere is the reg string for my ProfileImagePath[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1085031214-1682526488-1343024091-1003]ProfileImagePath is %SystemDrive%\Documents and Settings\MyUserName Edited August 7, 200521 yr by BoardBabe
August 7, 200521 yr Fixed both examples again!Now included the missing delimiter of tab, fingers crossed
August 7, 200521 yr Author Testing right away thanks for your help btw! Appriciate it alot... Feedback in 1 min... Stay tuned
August 7, 200521 yr Just make sure that when you've pasted it in, that delims=tab and not one or more spaces!
August 7, 200521 yr actually BoardBabe, Bilou Gateux's code works...just when using set, you dont get an output...as I said, you are gonna have to add whatever you want to do with the SID within the batch file as it is not permanent. Also, I find it funny that when people try to add more things to a simple batch, it fails to work...not that Im trying to stifle you Yzowl...I just dont see what was wrong with how I had it or how Bilou had it. Edited August 7, 200521 yr by evilvoice
August 7, 200521 yr Author @evilvoice: Yes I know, the method you posted works, and i rebuilt it to suite my need. But I still find Yzövl's method interesting, and are annoyed that I can't have it working This seems to work fine though@echo offfor /f "delims=\ tokens=2" %%i in ('reg query HKU ^| findstr /V /E Classes ^| findstr "S-1-5-21"') do set SID=%%ireg add HKU\%SID%\SOFTWARE\Synaptics\SynTP\TouchPadHEXBTNPS2 /v Gestures /t reg_dword /d 2 /fexit
August 8, 200521 yr There was nothing wrong with the codes Bilou Gateux or yourself used, in BoardBabes current case.My response only came when I realised that my machines in particular have several SIDs all starting with S-1-5-21. Your code is pointless in that case.
August 8, 200521 yr Just wondering: is it possible to make such registry changes (User ID) with .inf file?I use .cmd file and I'm happy with it. But just for educational purposes Best regards,Oleg 2
August 8, 200521 yr Another thought, first user created on my XP machine at the very end of SID is S-1-5-21-xxxxxxxxx-1004 perhaps this could be ADMIN or either first user?If they were using same name then read the ProfileImagePath and extract name from it maybe then you know you got the right one.I'm not using cmd's for my application, what I do is it save's the Current User SID to an ini during UACD Creation and then when it's called in setup I read the reg into a tmp and do a Replace(OldSid,NewSid) -> spit it outOleg_IIJust wondering: is it possible to make such registry changes (User ID) with .inf file?Yes, but you do need the current Sid in case it changed Edited August 8, 200521 yr by maxXPsoft
August 8, 200521 yr I may be wrong here but in this line...if errorlevel 0 if "%%~c" equ "%UserProfile%" set UserSID=%%aThe two STRINGS are not equal (for me)"%%~c" expands to "%SystemDrive%\Documents and Settings\Nakira""%UserProfile%" expands to "C:\Documents and Settings\Nakira"
Create an account or sign in to comment