Jump to content

[Registry] Settings Msn Messenger 7.5 "PerPassportSettings"


Recommended Posts

Hi ^^

I've tried to make a batch (cmd file) for:

- finding the automatically the value of "PerPassportSettings" from the registry

- settings this "PerPassportSettings" into my batch with query command (or other command of course ^^).

Unafortunatly my skill in batch programming is limited, so I need a little bit of help :)

Into registry: PerPassportSettings is here:

HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings\here the number to find

Note: here the number to find is the value of "PerPassportSettings"

I would like to retrieve this key into my batch for settings msn automatically. Something like this sample i've done (but this don't work).

for /f "Tokens=5" %%i in ('REG QUERY HKCU\Software\Microsoft\MSNMessenger /v "Key"^|find "Default"') do set key=%%i

REG ADD "HKCU\Software\Microsoft\MSNMessenger\%key%" /v "DisableTabs" /t REG_DWORD /d 00000001 /f

In RED i've marked what I think is wrong (probably all this script is wrong lol).

-> This script is execute during runonceex.cmd just after msn 7.5 installation...

Yzöwl or other master of art in batch coding...

Pleeeaase help O_O

Link to comment
Share on other sites


It can be dependent upon the content of your other sub-keys and since I do not have MSN, I cannot test the following code, however I am led to believe that the key you are after is numeric only, therefore

  @ECHO OFF &SETLOCAL
SET "PARTKEY=HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings"
FOR /F "DELIMS=" %%? IN ('REG QUERY "%PARTKEY%" /S ^|FINDSTR "\\[0-9]*$" ^2^>NUL') DO IF ERRORLEVEL 0 (SET FULLKEY=%%?)
IF DEFINED FULLKEY (
echo/REG ADD "%FULLKEY%" /V DisableTabs /T REG_DWORD /D 1 /F)
ENDLOCAL &GOTO :EOF

If you are happy with the result, remove echo/ from line 5.

Note, in order to identify line wrap, I have indented each line with two spaces, any line therefore not starting with two spaces has wrapped.

Link to comment
Share on other sites

Yeess !!!

This is exactly what i was trying to do :thumbup

I've made a quick test with this:

@ECHO OFF &SETLOCAL

SET "PARTKEY=HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings"

FOR /F "DELIMS=" %%? IN ('REG QUERY "%PARTKEY%" /S ^|FINDSTR "\\[0-9]*$" ^2^>NUL') DO IF ERRORLEVEL 0 (SET FULLKEY=%%?)

IF DEFINED FULLKEY (

REG ADD "%FULLKEY%" /V Toto /T REG_DWORD /D 1 /F)

ENDLOCAL &GOTO :EOF

And "toto" is add at the right place in my case:

HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\PerPassportSettings\2239632blabla

So it works, and works well :-)

Now we can add regtweak for msn messenger "fully unattended" !

What to says ? Uhhh maybe.... big big thanks Yzöwl you rocks ^__^

Link to comment
Share on other sites

If only people outside of my computer appreciated me as much as people on it

Then again, if that were the case, I probably wouldn't be here now!

Lets just smile and celebrate the fact that Yzöwl has no real friends

Link to comment
Share on other sites

[mode troll=on]

LOL :w00t:

An advice (not really serious) ^^

1. Buy a T-Shirt with "If you're a girl and panic with computing: I'm you're solution"

2. Buy a bottle of Champagne and create an association for "girl looking for fine lesson in computing"

3. Put the bottle (and candle and so on...) on a nice table near the computer.

Now you can say carefully to the girl, sorry computer has crashed, but... We still have Champagne and candle ^^

Isnt' it a beautiful solution ?

[mode troll=off]

Seriously (can it be ?)

Here's my script for msn 7.5, if anyone had headache with this in the past (me ? no, no, no: never ^^), now we have what we were looking for.

cmdow @ /HID

SETLOCAL

SET "PARTKEY=HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings"

FOR /F "DELIMS=" %%? IN ('REG QUERY "%PARTKEY%" /S ^|FINDSTR "\\[0-9]*$" ^2^>NUL') DO IF ERRORLEVEL 0 (SET FULLKEY=%%?)

IF DEFINED FULLKEY (

REG ADD "%FULLKEY%" /V DisableIntro /T REG_BINARY /D 01000000 /F

REG ADD "%FULLKEY%" /V DisableMSNToday /T REG_BINARY /D 01000000 /F

REG ADD "%FULLKEY%" /V DisableTabs /T REG_DWORD /D 1 /F

REG ADD "%FULLKEY%" /V PerPassportAppSettings /T REG_DWORD /D 1 /F

REG ADD "%FULLKEY%" /V UsedGroupsView /T REG_DWORD /D 1 /F

REG ADD "%FULLKEY%\GroupState" /V .ViewByOnline /T REG_DWORD /D 1 /F

)

SET "MSN=HKCU\Software\Microsoft\MSNMessenger"

IF DEFINED MSN (

REG ADD "%MSN%" /V DirectIM /T REG_BINARY /D 00000000 /F

REG ADD "%MSN%" /V FirstTimeUser /T REG_DWORD /D 0 /F

REG ADD "%MSN%" /V MainFrameHidden /T REG_BINARY /D 00000000 /F

)

ENDLOCAL &GOTO :EOF

settings usefull is:

DisableMSNToday

DisableTabs

FirstTimeUser

Yzöwl: Should i says thanks again ?

Definitevely: yeeesss

PS: You find this script useful ? So... Feel free to send Champagne to Yzöwl, now he know what to do with this french liquid ^^

Link to comment
Share on other sites

FOR /F "DELIMS=" %%? IN ('REG QUERY "%PARTKEY%" /S ^|FINDSTR "\\[0-9]*$" ^2^>NUL') DO ...

No way !

Regexp in my batches?!? :thumbup I'm learning every day.

Have to find out about those escaping ^, tho. Why and where do I need them? My friend?

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...