Jump to content

Is this reg string unique to each install?


Recommended Posts


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 by Yzöwl
Link to comment
Share on other sites

Let's give it a shot and see :D

:unsure: SID not found

Hmm this is really strange

Here 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 by BoardBabe
Link to comment
Share on other sites

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 by evilvoice
Link to comment
Share on other sites

@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 :P

This seems to work fine though

@echo off

for /f "delims=\ tokens=2" %%i in ('reg query HKU ^| findstr /V /E Classes ^| findstr "S-1-5-21"') do set SID=%%i

reg add HKU\%SID%\SOFTWARE\Synaptics\SynTP\TouchPadHEXBTNPS2 /v Gestures /t reg_dword /d 2 /f

exit

Link to comment
Share on other sites

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

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

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 out

Oleg_II

Just 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 by maxXPsoft
Link to comment
Share on other sites

I may be wrong here but in this line...

if errorlevel 0 if "%%~c" equ "%UserProfile%" set UserSID=%%a

The 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...