Yzöwl Posted August 7, 2005 Share Posted August 7, 2005 (edited) Code deleted, please see the updated version. Edited August 9, 2005 by Yzöwl Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 Still get SID not found. Oh well :/ Guess this method is not for me Link to comment Share on other sites More sharing options...
Yzöwl Posted August 7, 2005 Share Posted August 7, 2005 (edited) 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, 2005 by Yzöwl Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 (edited) 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, 2005 by BoardBabe Link to comment Share on other sites More sharing options...
Yzöwl Posted August 7, 2005 Share Posted August 7, 2005 Fixed both examples again!Now included the missing delimiter of tab, fingers crossed Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 Testing right away thanks for your help btw! Appriciate it alot... Feedback in 1 min... Stay tuned Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 Still get SID not found. Link to comment Share on other sites More sharing options...
Yzöwl Posted August 7, 2005 Share Posted August 7, 2005 Just make sure that when you've pasted it in, that delims=tab and not one or more spaces! Link to comment Share on other sites More sharing options...
evilvoice Posted August 7, 2005 Share Posted August 7, 2005 (edited) 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, 2005 by evilvoice Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 I did. All others are spaces right? Link to comment Share on other sites More sharing options...
BoardBabe Posted August 7, 2005 Author Share Posted August 7, 2005 @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 Link to comment Share on other sites More sharing options...
Yzöwl Posted August 8, 2005 Share Posted August 8, 2005 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. Link to comment Share on other sites More sharing options...
Oleg_II Posted August 8, 2005 Share Posted August 8, 2005 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 Link to comment Share on other sites More sharing options...
maxXPsoft Posted August 8, 2005 Share Posted August 8, 2005 (edited) 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, 2005 by maxXPsoft Link to comment Share on other sites More sharing options...
nakira Posted August 8, 2005 Share Posted August 8, 2005 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" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now