![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | vbscript if reg exist ..... PLease urgent help i run the script as a .vbs nothing happens. the key is not removed. i have confirmed the key "{264600DE-0879-4231-9F93-9CE3D503DFC1}" and the key diffenatelty exist. strUninstallRMS6 = "\\lbnfilr002\Packages\PkgsQ-T\RMS" _ & "\RMS63\uninstallRMS6.bat" sKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" _ & "\Uninstall\{264600DE-0879-4231-9F93-9CE3D503DFC1}\" if CStr(CheckRegKey(sKey)) then set WshShell = CreateObject("WScript.Shell") WSHShell.Run strUninstallRMS6, 1 , FALSE end if Function CheckRegKey(sKey) On Error Resume next with CreateObject("WScript.Shell") .RegRead sKey end with CheckRegKey = (Err.Number = 0) On Error Goto 0 end function -------------------------------------------------------------------------- Ive tested the below and it definately works. i need the if statment to work. set WshShell = WScript.CreateObject("WScript.Shell") strUninstallRMS6 = "\\lbnfilr002\Packages\PkgsQ-T\RMS \RMS63\uninstallRMS6.bat" WSHShell.Run strUninstallRMS6, 1 , FALSE WScript.Quit PLease urgent help thanks |
My System Specs![]() |
| | #2 (permalink) |
| | Re: vbscript if reg exist ..... Have a look at the three other threads you started on this topic. "deen" <an509@xxxxxx> wrote in message news:819e1b07-82c4-4173-b986-f83a457aeb23@xxxxxx Quote: > PLease urgent help > > i run the script as a .vbs nothing happens. the key is not removed. > i have confirmed the key "{264600DE-0879-4231-9F93-9CE3D503DFC1}" > and the key diffenatelty exist. > > > strUninstallRMS6 = "\\lbnfilr002\Packages\PkgsQ-T\RMS" _ > & "\RMS63\uninstallRMS6.bat" > sKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" _ > & "\Uninstall\{264600DE-0879-4231-9F93-9CE3D503DFC1}\" > if CStr(CheckRegKey(sKey)) then > set WshShell = CreateObject("WScript.Shell") > WSHShell.Run strUninstallRMS6, 1 , FALSE > end if > > > Function CheckRegKey(sKey) > On Error Resume next > with CreateObject("WScript.Shell") > .RegRead sKey > end with > CheckRegKey = (Err.Number = 0) > On Error Goto 0 > end function > > -------------------------------------------------------------------------- > > Ive tested the below and it definately works. i need the if statment > to work. > > set WshShell = WScript.CreateObject("WScript.Shell") > strUninstallRMS6 = "\\lbnfilr002\Packages\PkgsQ-T\RMS > \RMS63\uninstallRMS6.bat" > > WSHShell.Run strUninstallRMS6, 1 , FALSE > WScript.Quit > > PLease urgent help > > thanks |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Does this exist? | Network & Sharing | |||
| How to do No hang up VBScript (nohup for VBScript) | VB Script | |||
| vbscript registry exist then...... | VB Script | |||
| Re: Does this exist? | Live Mail | |||
| DNS Name does not exist | Vista account administration | |||