Jump to content

Windows XP Remote Assistance and more


gpich
 Share

Recommended Posts

I wrote this to help reduce the time I spend on the phone with help desk functions. I am new at this so any recomendations are appreciated. This is supposed to make a gui, display some system info, and create a xp request for assistance sending to the person selected in the radio once the button is pushed. I saw somebody looking for something that would do this on some other board, not autoit so if thats you hopefully this works. You will need to replace anything with two pluses in front of it with your info. (++xxxx) You'll see what I mean. Works when compiled with 3.0.103.

#include <GUIConstants.au3>

;make the gui

GUICreate("Virtual Help Desk")

GUISetState (@SW_SHOW)

GUISetBkColor(0x87CEFA)

GUISetFont(9, 400, 0, "Arial")

;make gui labels

GUICtrlCreateLabel ("Primary IP Address:",10,30)

GUICtrlCreateLabel ("Secondary IP Address:",10,50)

GUICtrlCreateLabel ("Computer Name:",10,70)

GUICtrlCreateLabel ("User Name:",10,90)

;put info next to labels

GUISetFont(9, 400, 2, "Arial")

GUICtrlCreateLabel (@IPAddress1,100,30)

GUICtrlSetColor(-1,0x4B0082)

GUICtrlCreateLabel (@IPAddress2,110,50)

GUICtrlSetColor(-1,0x4B0082)

GUICtrlCreateLabel (@ComputerName,110,70)

GUICtrlSetColor(-1,0x4B0082)

GUICtrlCreateLabel (@UserName,83,90)

GUICtrlSetColor(-1,0x4B0082)

GUISetState()

;create variable controls

$sendrequest = GuiCtrlCreateButton ("Send Request", 220, 133)

$group_1 = GUICtrlCreateGroup ("Remote Assistane", 5, 105, 310, 80)

GUIStartGroup()

Dim $helper1 = GUICtrlCreateRadio ("Send Request to ++Helper1", 10, 120, 179, 20)

Dim $helper2 = GUICtrlCreateRadio ("Send Request to ++Helper2", 10, 140, 183, 20)

Dim $helper3 = GUICtrlCreateRadio ("Send Request to ++Helper3", 10, 160, 185, 20)

$radioval1 = 0

$radioval2 = 2

;show gui

GuiSetState ()

;get variable control state

While 1

   Global $msg = GuiGetMsg()

   Select

       Case $msg = $GUI_EVENT_CLOSE

         Exit

      Case $msg = $GUI_EVENT_MINIMIZE

      Case $msg = $GUI_EVENT_MAXIMIZE

      Case $msg = $sendrequest

         Global $radioval1 

         createrequest()

      Case $msg >= $helper1 AND $msg <= $helper3

         $radioval1 = $msg - $helper1

   EndSelect

WEnd

;this is a function that creates a remote assistance request

Func createrequest()

;blocks keyboard/mouse input

BlockInput(1)

;had to run the same command 3x because Microsoft changes the cursor location every time you run this, they dont want you to do it like this

Run("C:\WINDOWS\PCHealth\HelpCtr\Binaries\helpctr -fromhcp -url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen1.htm")

Sleep(1000)

Run("C:\WINDOWS\PCHealth\HelpCtr\Binaries\helpctr -fromhcp -url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen1.htm")

Sleep(1000)

Run("C:\WINDOWS\PCHealth\HelpCtr\Binaries\helpctr -fromhcp -url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen1.htm")

Sleep(1000)

Send("{ENTER}")

;display a progress bar for 35 seconds, thats about how long it takes to create the request

ProgressOn("Creating Help Request...", "Please be patient", "0 percent")

For $i = 10 to 100 step 10

   sleep(3300)

   ProgressSet( $i, $i & " Percent")

Next

ProgressSet(100 , "Done", "Complete")

Sleep(500)

ProgressOff()

;determine whice radio button is selected and based on that use email address

While 1

   IF $radioval1 = 0 Then

      Send("++helper1 email address goes here")

   Else

   EndIf

   IF $radioval1 = 1 Then

      Send("++helper2 email address goes here")

   Else

   EndIf

   If $radioval1 = 2 Then

      Send("++helper3 email address goes here")

   EndIf

   ExitLoop

WEnd

;the rest of the steps needed

Send("{TAB 2}")

Send("{ENTER}")

Send("{TAB 2}")

Send("{ENTER}")

Send("{TAB 2}")

Send("{SPACE}")

Send("{TAB}")

Send("{ENTER}")

Sleep(5000)

Send("+{TAB}")

Send("{ENTER}")

Sleep(8000)

Send("+{TAB}")

Send("{ENTER}")

Sleep(1000)

;unblock input

BlockInput(0)

;close help and support screen

Send("!{F4}")

EndFunc

;close gui if instructed

While 1

    $msg = GUIGetMsg()

    

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend
Edited by Larry
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...