/build/static/layout/Breadcrumb_cap_w.png

replace in the strings

Dim WSHShell,strRegKey

Set WSHShell = CreateObject("WScript.Shell")

strRegKey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path"

 

If KeyExists(strRegKey) = True Then

 

   SITE = WSHShell.RegRead(strRegKey)

 

                Result = Replace(SITE, ";;", ";")

 

                FirstChar = Left(Result,1)

                LastChar = Right(Result,1)

               

 

                If FirstChar = ";" Then

                                LeftoverFirstChar = Mid(Result,2)

                                Result = LeftoverFirstChar

                End If

 

                Count = Len(Result) -1

 

                If LastChar = ";" Then

                                LeftoverLastChar = Left(Result,count)

                                Result = LeftoverLastChar

                End If

 

                'wscript.echo FirstChar

                'wscript.echo LastChar

                'wscript.echo LeftoverFirstChar

                'Wscript.echo LeftoverLastChar

                'wscript.echo Result

 

    WSHShell.Regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path",Result,"REG_EXPAND_SZ"

 

 

Else

End If

 

Function KeyExists (strRegKey)

Dim key2

On Error Resume Next

key2 = WSHShell.RegRead (strRegKey)

If err <> 0 Then

KeyExists = False

Else

KeyExists = True

End if

End Function


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ