Jump to content
rami

Commands are Menus

Recommended Posts

Hello,

 

Any of you guys are experiencing with issue using "Commands are Menus" in Custom Tabs?

I got few tabs as "Data List" but unfortunately cannot use Right Click function because when I check "Commands are Menus" and choose the command\script it doesn't run!

BUT the same commands\scripts run well through the Bar.

 

I tried to uninstall the custom tab and reinstall it with no chance.

 

Any one can please tell me how doe's it work with him? Any thought what am I doing wrong?

 

Let's say I have this table as example (Data List):

 

edit*: What should i do exactly?

 

Thank you

Untitled.png.7afa1bf164880a48e6f49a5d652097bc.png

Edited by Guest

Share this post


Link to post
Share on other sites

I hadn't tried this before but did just now and it doesn't seem to be working for me either.

 

p.s. im envious of your tabs there, any plans to share some day? :P

Share this post


Link to post
Share on other sites

p.s. im envious of your tabs there, any plans to share some day? :P

:D Yes sure, I can share everything you want , or if anyone asks.

 

Edit*: English is not my native language so I apologize if I'm not very clear. (that why 7 times edited :) )

 

initially, this is my query in "Updates" custom tab:

SELECT DISTINCT 'C',CONCAT('KB',HotFixData.KBID) AS KBID, HotFixData.CategoryName AS Category, HotFixData.Severity, hotfixdata.Title, IF(Hotfix.Installed=1,'Installed','Missing') AS Installed FROM hotfix LEFT JOIN hotfixdata ON hotfixdata.HotFixID = hotfix.HotFixID LEFT JOIN computers ON computers.ComputerID = hotfix.ComputerID WHERE hotfix.approved = 1 AND hotfix.Installed<>1 AND hotfixdata.Ignore <> 1 AND HotFixData.KBID <> 0 AND hotfixdata.CategoryName <> 'Drivers' AND hotfixdata.kbID NOT LIKE '%3035583%' AND hotfixdata.Title NOT LIKE '%Upgrade to Windows 10%' AND hotfixdata.CategoryName NOT LIKE '%Skype%' AND hotfixdata.Title NOT LIKE '%Skype%' AND hotfixdata.CategoryName NOT LIKE '%Bing%' AND hotfixdata.Title NOT LIKE '%Bing%' AND hotfixdata.Title NOT LIKE '%Security Essentials%' AND (computers.ComputerID = %ComputerID%)

I will start writing about each button considering my time :)

 

Check n' Repair WUA:

--------------------------

This one runs script to check the version of Windows Update Agent if older than the one in Microsoft, it will download the new one and apply it.

See the script's notes here >>> viewtopic.php?f=7&t=2123&start=50#p13750

But in that post Oct 2015 version, Edit*

Please find it attached "Check and Update WUA.zip"

 

EDIT: The Script Check n' Repair WUA is now updated till March 2016 as Microsoft: https://support.microsoft.com/en-us/kb/3138612

 

Updated 12/1/2016:

FYI: The WUA updated in July

7.6.7601.23453 for Win7 and Serv2008 https://support.microsoft.com/en-us/kb/3172614

7.9.9600.18340 for Win8.1 and Serv2012 https://support.microsoft.com/en-us/kb/3172605

Anyone can easily update the attached script by changing the %powershellresult% check to the mentioned versions, then replacing the download link for each KB as provided in this Edit. regarding to the OS Version.

If you find it is hard to edit the script please let me know.

 

 

Install [KB]:

--------------

When you click this button popup message will appear asking which KBID we want to install. Here we have to write the KB Numbers ONLY

Anyways if we write something wrong (letters, spaces, not a correct ID, etc .) log message in Script tab will tell us that.

111.jpg

Then it will bring the Windows update related to this KB, and try to push it through LT update to the target.

using:

SELECT hotfixdata.Title FROM hotfix LEFT JOIN hotfixdata ON hotfixdata.HotFixID = hotfix.HotFixID LEFT JOIN computers ON computers.ComputerID = hotfix.ComputerID WHERE hotfixdata.kbID = @KBID@ AND (computers.ComputerID = '%ComputerID%')

222.jpg

Please find it attached "Install [KBID].zip"

 

Uninstall [KB]:

-----------------

The same parameter as the prior one, but it will uninstall the KBID using:

Powershell: get-hotfix -id KB@KBID@
Shell: wusa.exe /uninstall /quiet /norestart /KB:@KBID@

Please find it attached "Uninstall [KBID].zip"

 

Uninstall Win10 Promo:

----------------------------

You can find it here >>> viewtopic.php?f=5&t=2503#p15574

Install [KBID].zip

Uninstall [KBID].zip

Check and Update WUA.zip

Edited by Guest

Share this post


Link to post
Share on other sites

Reset Windows Update Component:

------------------------------------------

Resetting Windows Update components can be a solution for common Windows Update errors.

The button calls a script that does the following steps:

• Restore Windows Update Settings to default

• Set Windows Update Settings to LabTech Mode

• Set the Update mode to "Windows and other products from Microsoft" (because the default one not includes the products)

• All 12 steps as Microsoft provided here: https://support.microsoft.com/en-us/kb/971058 includes the last 2 steps to install the last WUA (here it runs our script to check and update WUA) then restart the computer.

So, please note that the computer will restart after pushing this button and finish its job to get 100% of the results.

Find it attached "Reset Windows Update Components.zip"

 

Fix WU Error

---------------

I'm sorry, I don't know if I can attach this one because it is huge one, this button is one main script (157 lines) calls about 20 child scripts after knowing the error code that you provide as parameter.

I will write the idea later today maybe some one will be interested to work on it few days\weeks :)

Reset Windows Update components.zip

Share this post


Link to post
Share on other sites

Ok, So the Fix Windows Update Error

 

This PROJECT contains:

78+ error codes listed in 20 lists

20 fixes methods

16 child scripts

21+ email types

1 main script to control the all previous, with parameter @Error_Code@ and enough log messages to know what is the script doing

 

The main script simply works as the following chart:

 

 

Example 1:

If the @Error_Code@ is: 0x8024402f (which is related to update issues for Windows Defender), the script will go to :ErrorList19 - Label, which runs the fixing methods for this error, such as:

1, EXECUTE: "C:\Program Files\Windows Defender\MpCmdRun.exe" -RemoveDefinitions

2, EXECUTE: "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate

3, EXECUTE: "C:\Program Files\Windows Defender\MpCmdRun.exe" -scan -scantype 1

4, Restart couple services

5, Email the report to LTUser who clicked this button, with direct link to MS KB about this error https://support.microsoft.com/en-us/kb/918355

 

Example 2:

@Error_Code@ = 800706ba (which can occur if an update installation crashes), the script will go to :ErrorList06 - Label, which just sends email asking to restart the PC + what is the recommendation method from MS

 

 

Example 3:

If @Error_Code@ = 8000641213 (which is wrong, or it is not listed in main script as an error code) , the script will go to :Not_Listed - Label, which sends email to LTuser who has ran this script, and to me.

 

That will help me to update the script and search for the unlisted error codes later.

 

Example 4:

Some errors can caused by Malware, I check if our AV installed (our company uses ESET) If found I run the manual scan and clean, if not I detect the AV there using:

1, SET:  @avsoftwareid@ = SQLRESULT[sELECT IF(virusscanner = '',0,virusscanner) FROM computers WHERE computerid=%computerid%]
2, SET:  @avname@ = SQLRESULT[sELECT NAME FROM virusscanners WHERE vscanid=@avsoftwareid@]

Then i run the LT Script functions: "Virus Definition Update" and "Virus Scan: %systemdrive%"

It all fails if "AV Exclude" is installed on that computer, so this example has 2 different emails, one to inform about the process as all previous emails, second if "AV Exclude" found, so no update nor scan will be run automatically because it is a dummy AV.

 

 

Notes:

- If some one is already planing to do like this stuff, i'm ready to help in any step if needed, BUT please note that using wrong solution to fix one issue can cause damage to system files or registry entries or any other problem, for this reason I was choosing ALL fix methods and solutions from Microsoft, Technet, and Windows Help

- I would prefer to add: "If computer needs reboot" then exit script (by checking Need Reboot flag), because as you know few of WU errors can be solved after restart.

 

I believe that was it :)

 

Thank you

chart.jpg.113d76e0433c4a117adde1d2ef93645a.jpg

aaa.jpg.8f68e11f8505f2a86a27942205216fb9.jpg

aaaaa.jpg.eef47e534fda780b23d73251e2328dac.jpg

Share this post


Link to post
Share on other sites

Thank you rgreen83 :)

Actually, I have few (cool) custom tabs, but I feel like they are incomplete without commands are menus function ..

I hope @Greg will fix that.

Share this post


Link to post
Share on other sites

Install [KB]

Parameters: KBID=%ASK%%KBID%%What is the KB number you want to install? (without "KB")%

 

 

Uninstall [KB]

Parameters: KBID=%ASK%%KBID%%What is the KB number you want to uninstall? (without "KB")%

 

 

P.S: i had the same question before and they answered me in the main post :)

viewtopic.php?f=21&t=198&start=150#p12768

1.JPG.48bfbce07ffbf6a56f4392066a8b8048.JPG

2.JPG.92050688030e7e6e5eb4698b2cefa9b2.JPG

Share this post


Link to post
Share on other sites

Rami, this looks great. I tried using the sql posted but they did not work. Do you mind exporting your tab setup and attaching it to a post?

 

Thank you!!

Share this post


Link to post
Share on other sites

hugoh,

I think you are talking about the SQL in the 2-nd post, it works only in Custom Tab viewtopic.php?f=21&t=198 , if you run it in SQLyog or any program you need to remove from the end:

AND (computers.ComputerID = %ComputerID%)

 

Anyways, here it is:

 

the SQL Query is the same in 2nd post

Capture.JPG.d2f0e22e23a4b2b63493ce9535c733e0.JPG

Share this post


Link to post
Share on other sites

p.s. im envious of your tabs there, any plans to share some day? :P

:D Yes sure, I can share everything you want , or if anyone asks.

 

Edit*: English is not my native language so I apologize if I'm not very clear. (that why 7 times edited :) )

 

initially, this is my query in "Updates" custom tab:

SELECT DISTINCT 'C',CONCAT('KB',HotFixData.KBID) AS KBID, HotFixData.CategoryName AS Category, HotFixData.Severity, hotfixdata.Title, IF(Hotfix.Installed=1,'Installed','Missing') AS Installed FROM hotfix LEFT JOIN hotfixdata ON hotfixdata.HotFixID = hotfix.HotFixID LEFT JOIN computers ON computers.ComputerID = hotfix.ComputerID WHERE hotfix.approved = 1 AND hotfix.Installed<>1 AND hotfixdata.Ignore <> 1 AND HotFixData.KBID <> 0 AND hotfixdata.CategoryName <> 'Drivers' AND hotfixdata.kbID NOT LIKE '%3035583%' AND hotfixdata.Title NOT LIKE '%Upgrade to Windows 10%' AND hotfixdata.CategoryName NOT LIKE '%Skype%' AND hotfixdata.Title NOT LIKE '%Skype%' AND hotfixdata.CategoryName NOT LIKE '%Bing%' AND hotfixdata.Title NOT LIKE '%Bing%' AND hotfixdata.Title NOT LIKE '%Security Essentials%' AND (computers.ComputerID = %ComputerID%)

I will start writing about each button considering my time :)

 

Check n' Repair WUA:

--------------------------

This one runs script to check the version of Windows Update Agent if older than the one in Microsoft, it will download the new one and apply it.

See the script's notes here >>> viewtopic.php?f=7&t=2123&start=50#p13750

But in that post Oct 2015 version, Edit*

Please find it attached "Check and Update WUA.zip"

 

EDIT: The Script Check n' Repair WUA is now updated till March 2016 as Microsoft: https://support.microsoft.com/en-us/kb/3138612

 

Updated 12/1/2016:

FYI: The WUA updated in July

7.6.7601.23453 for Win7 and Serv2008 https://support.microsoft.com/en-us/kb/3172614

7.9.9600.18340 for Win8.1 and Serv2012 https://support.microsoft.com/en-us/kb/3172605

Anyone can easily update the attached script by changing the %powershellresult% check to the mentioned versions, then replacing the download link for each KB as provided in this Edit. regarding to the OS Version.

If you find it is hard to edit the script please let me know.

 

 

Install [KB]:

--------------

When you click this button popup message will appear asking which KBID we want to install. Here we have to write the KB Numbers ONLY

Anyways if we write something wrong (letters, spaces, not a correct ID, etc .) log message in Script tab will tell us that.

111.jpg

Then it will bring the Windows update related to this KB, and try to push it through LT update to the target.

using:

SELECT hotfixdata.Title FROM hotfix LEFT JOIN hotfixdata ON hotfixdata.HotFixID = hotfix.HotFixID LEFT JOIN computers ON computers.ComputerID = hotfix.ComputerID WHERE hotfixdata.kbID = @KBID@ AND (computers.ComputerID = '%ComputerID%')

222.jpg

Please find it attached "Install [KBID].zip"

 

Uninstall [KB]:

-----------------

The same parameter as the prior one, but it will uninstall the KBID using:

Powershell: get-hotfix -id KB@KBID@
Shell: wusa.exe /uninstall /quiet /norestart /KB:@KBID@

Please find it attached "Uninstall [KBID].zip"

 

Uninstall Win10 Promo:

----------------------------

You can find it here >>> viewtopic.php?f=5&t=2503#p15574

 

We have been struggling with Windows 7 Patches for sometime due the Windows Update Agent, your script to get update the windows update agent worked a treat thank you.

Edited by Guest

Share this post


Link to post
Share on other sites

We have been struggling with Windows 7 Patches for sometime due the Windows Update Agent, your script to get the update agent worked a treat thank you.

 

Thank you BIT, happy to hear that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×