Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: vbscript if reg exist

Reply
Thread Tools Display Modes

Re: vbscript if reg exist

 
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      09-24-2008
You now have at least four thread running with this query. Have a look at
this site to see the advantages of cross-posting versus multi-posting:
http://www.blakjak.demon.co.uk/mul_crss.htm


"deen" <> wrote in message
news:66a2b137-e55e-40c8-b6c9-...
> 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\CurrentVersio n" _
> & "\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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does this exist? rothschild86 Windows Live Mail 4 11-12-2007 06:29 PM
Can IE6 and IE7 co-exist? rhino Internet Explorer 2 10-26-2007 06:34 PM
Re: Please Help !! VBscript convert my image/music file into VBscript file Dave Patrick Scripting 0 12-10-2006 01:37 PM
This NG Should Not Exist BullsFan Andy Windows Update 5 11-20-2004 01:15 PM
Can I call a VBscript from another VBscript? Wesley Scripting 4 05-26-2004 06:34 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59