|
Prev: How to do something in an VBS script for all worksheets of an Exce
Next: How to mail enable an Distributiongroup
From: PaulM on 24 Jun 2008 17:42 Can anyone tell me why the script will not work? 'Enable or Disable Pop Up Descriptions On Error Resume Next Message = "This script will Enable or Disable Pop Up Descriptions." & vbCr Message = Message & "Don't forget to Refresh the Desktop for this to take effect." & vbCr & vbCr Message = Message & "Continue?" X = MsgBox(Message, vbYesNo + vbQuestion, "Name Here") If X = 6 Then Set WSHShell = WScript.CreateObject("WScript.Shell") errnum = Err.Number WshShell.RegRead ( "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" ) If errnum = Err.Number = 0 Then WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", 1, "REG_DWORD" MsgBox "Pop Up Descriptions are now ENABLED" & vbCr & "Don't forget to Refresh the Desktop!" &vbcr & _ vbCr & "Ths scrip was download from name here.", 64, "Done!" End If If errnum = Err.Number = 1 then WshShell.RegRead ( "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" ) If errnum = Err.Number = 1 Then WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", 0, "REG_DWORD" MsgBox "Pop Up Descriptions are now DISABLE" & vbCr & "Don't forget to Refresh the Desktop!" &vbcr & _ vbCr & "Ths scrip was download from name here.", 16, "Done!" End If End If End If
From: Al Dunbar on 24 Jun 2008 19:50 Do you want us all to try it to see what actually happens? Why don't you just tell us what happens when you run it? /Al "PaulM" <paul(a)paulsxp.com> wrote in message news:OOIo7Mk1IHA.552(a)TK2MSFTNGP06.phx.gbl... > Can anyone tell me why the script will not work? > > 'Enable or Disable Pop Up Descriptions > On Error Resume Next > > Message = "This script will Enable or Disable Pop Up Descriptions." & vbCr > Message = Message & "Don't forget to Refresh the Desktop for this to take > effect." & vbCr & vbCr > Message = Message & "Continue?" > > X = MsgBox(Message, vbYesNo + vbQuestion, "Name Here") > If X = 6 Then > Set WSHShell = WScript.CreateObject("WScript.Shell") > errnum = Err.Number > WshShell.RegRead ( > "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" > ) > If errnum = Err.Number = 0 Then > WshShell.RegWrite > "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", > 1, "REG_DWORD" > MsgBox "Pop Up Descriptions are now ENABLED" & vbCr & "Don't forget to > Refresh the Desktop!" &vbcr & _ > vbCr & "Ths scrip was download from name here.", 64, "Done!" > End If > > If errnum = Err.Number = 1 then > WshShell.RegRead ( > "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" > ) > If errnum = Err.Number = 1 Then > WshShell.RegWrite > "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", > 0, "REG_DWORD" > MsgBox "Pop Up Descriptions are now DISABLE" & vbCr & "Don't forget to > Refresh the Desktop!" &vbcr & _ > vbCr & "Ths scrip was download from name here.", 16, "Done!" > > End If > End If > End If > > >
From: PaulM on 24 Jun 2008 23:48 Thanks, but forget it. I will try another way. "Al Dunbar" <AlanDrub(a)hotmail.com.nospaam> wrote in message news:ux6DLYl1IHA.5832(a)TK2MSFTNGP02.phx.gbl... > Do you want us all to try it to see what actually happens? Why don't you > just tell us what happens when you run it? > > /Al > > "PaulM" <paul(a)paulsxp.com> wrote in message > news:OOIo7Mk1IHA.552(a)TK2MSFTNGP06.phx.gbl... >> Can anyone tell me why the script will not work? >> >> 'Enable or Disable Pop Up Descriptions >> On Error Resume Next >> >> Message = "This script will Enable or Disable Pop Up Descriptions." & >> vbCr >> Message = Message & "Don't forget to Refresh the Desktop for this to take >> effect." & vbCr & vbCr >> Message = Message & "Continue?" >> >> X = MsgBox(Message, vbYesNo + vbQuestion, "Name Here") >> If X = 6 Then >> Set WSHShell = WScript.CreateObject("WScript.Shell") >> errnum = Err.Number >> WshShell.RegRead ( >> "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" >> ) >> If errnum = Err.Number = 0 Then >> WshShell.RegWrite >> "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", >> 1, "REG_DWORD" >> MsgBox "Pop Up Descriptions are now ENABLED" & vbCr & "Don't forget to >> Refresh the Desktop!" &vbcr & _ >> vbCr & "Ths scrip was download from name here.", 64, "Done!" >> End If >> >> If errnum = Err.Number = 1 then >> WshShell.RegRead ( >> "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip" >> ) >> If errnum = Err.Number = 1 Then >> WshShell.RegWrite >> "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip", >> 0, "REG_DWORD" >> MsgBox "Pop Up Descriptions are now DISABLE" & vbCr & "Don't forget to >> Refresh the Desktop!" &vbcr & _ >> vbCr & "Ths scrip was download from name here.", 16, "Done!" >> >> End If >> End If >> End If >> >> >> > >
From: Reventlov on 26 Jun 2008 17:53 Il giorno Tue, 24 Jun 2008 17:50:48 -0600, "Al Dunbar" <AlanDrub(a)hotmail.com.nospaam> ha scritto: >Do you want us all to try it to see what actually happens? Why don't you >just tell us what happens when you run it? At first sight, it happens that you shot something to the Registry and probably cannot be able to go back to the previous settings of Internet Explorer as they are overwritten. -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) --
From: PaulM on 26 Jun 2008 20:45
Thanks, but I got the script to run just fine. "Reventlov" <noone(a)no.void> wrote in message news:486366fd.1395840515(a)powernews.libero.it... > Il giorno Tue, 24 Jun 2008 17:50:48 -0600, "Al Dunbar" > <AlanDrub(a)hotmail.com.nospaam> ha > scritto: >>Do you want us all to try it to see what actually happens? Why don't you >>just tell us what happens when you run it? > > At first sight, it happens that you shot something to the Registry and > probably cannot be > able to go back to the previous settings of Internet Explorer as they are > overwritten. > > -- > Giovanni Cenati (Bergamo, Italy) > Write to "Reventlov" at katamail com > http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) > -- |