Query the windows registry

I had the need to query the registry for a specific string, if the string is found or not then engage an action.

Within this scenario as example, it query the registry and a specified string, an action is taken if this one is not found/present.

 

@ECHO OFF
set regpath=HKLM\Software\Microsoft\xx\
set regvalue=mystring
set regdata=1
reg query "%regpath%" /v "%regvalue%" | find /i "%regdata%"
if errorlevel 1 (
      echo Please wait blah blah......
      Start /WAIT .\myprog\install.exe
      EXIT /B /0
)

 

Change shell of windows 7 for only one specific user

Rather to change the default shell of the entire machine, you can also assign to one of the user to run another shell than explorer.

Create key into the registry that belongs to your user; To make sure that you change the right user, logon once with your user credential and open regedit.exe (you might need to change the rights to allow registry access or runas..)

Continue reading “Change shell of windows 7 for only one specific user”