Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
Ok here goes...
Keep in mind this is still VERY incomplete!!
Here's the kix code...
code:
SetConsole("hide") BREAK ON CLS ;---------------------------------------------------------------------------------------- ; Helpdesk Program to be used by Users - [ By Rocco Capra ] The program gathers needed ; info from the user's PC and has them type in a discription of the problem. This info ; is then sent to SOS (sos@email.com) ;---------------------------------------------------------------------------------------- IF Exist('%TEMP%\disc.tmp') DEL '%TEMP%\disc.tmp' ENDIF $DISCFILE='%TEMP%\disc.tmp' IF Exist('%TEMP%\output.tmp') DEL '%TEMP%\output.tmp' ENDIF $OUTPUT='%TEMP%\output.tmp' ;---------------------------------------------------------------------------------------- SHELL '%COMSPEC% /c kixwin "file://'+@CURDIR+'\_prom.html" "'+@USERID+'" > "'+$DISCFILE+'"' IF @ERROR = -1 QUIT(0) ENDIF $REQUEST=ReadProfileString('$DISCFILE','HelpDesk','request') ;---------------------------------------------------------------------------------------- SELECT CASE($REQUEST='PC Support') SHELL '%COMSPEC% /c kixwin "file://'+@CURDIR+'\_disc.html" "'+@USERID+'" > "'+$DISCFILE+'"' IF @ERROR = -1 QUIT(0) ENDIF ;---------------------------------------------------------------------------------------- $ID=0 $PRINTERS2='[' $PRINTERS=EnumValue('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices',$ID) DO $PRINTERS2=$PRINTERS2+$PRINTERS+'][' $ID=$ID+1 $PRINTERS=EnumValue('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices',$ID) UNTIL @ERROR<>0 $DPRINT=ReadValue('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','device') IF (len($DPRINT)=0) $DPRINTER='[NONE]' ELSE $PARRAY=Split('$DPRINT',',') $DPRINTER='['+$PARRAY[0]+']' ENDIF ;---------------------------------------------------------------------------------------- $DISC=ReadProfileString('$DISCFILE','HelpDesk','disc') $RC=Open(1,$OUTPUT,5) $RC=WriteLine(1,'UserName = '+@USERID+@CRLF+ 'Computer Name = '+@WKSTA+@CRLF+ 'Operating System = '+@PRODUCTTYPE+@CRLF+ 'Processor Speed = '+@MHZ+@CRLF+ 'Installed Memory = '+MemorySize(0)+'_mb'+@CRLF+ 'Available Memory = '+MemorySize(1)+'_mb'+@CRLF+ 'Installed PageFile = '+MemorySize(2)+'_mb'+@CRLF+ 'Available PageFile = '+MemorySize(3)+'_mb'+@CRLF+ 'Free Space on C:\ = '+GetDiskSpace('C:\')+'_Kb | '+ (Val(GetDiskSpace('C:\'))/1024)+'_Mb'+@CRLF+ 'Installed Printers = '+$PRINTERS2+@CRLF+ 'Default Printer = '+$DPRINTER+@CRLF+ 'IP Address = '+@IPADDRESS0+@CRLF+ 'Date = '+@DATE+@CRLF+ 'Time = '+@TIME+@CRLF+ '----------------------------------'+@CRLF+ 'Explanation of Problem : '+@CRLF+@CRLF+$DISC) $RC=Close(1) $CMD=@CURDIR+'\blat.exe '+$OUTPUT+ ' -t rcapra@@email.com -f '+ @USERID+'@@email.com'+ ' -s "Help Desk Request"' SHELL $CMD ;---------------------------------------------------------------------------------------- CASE($REQUEST='New User') ;to do - Build WHILE LOOP to check for blank 'required' fields... SHELL '%COMSPEC% /c kixwin "file://'+@CURDIR+'\_user.html" "'+@USERID+'" > "'+$DISCFILE+'"' IF @ERROR = -1 QUIT(0) ENDIF ;---------------------------------------------------------------------------------------- ;to do - Build IF statmenst to leave out blank fields. $ASSCHOICE=ReadProfileString('$DISCFILE','UserMaint','asschoice') $MANAGER=ReadProfileString('$DISCFILE','UserMaint','manager') $MANAGERTELE=ReadProfileString('$DISCFILE','UserMaint','managertele') $ASSNAME=ReadProfileString('$DISCFILE','UserMaint','assname') $COMPANY=ReadProfileString('$DISCFILE','UserMaint','company') $DEPARTMENT=ReadProfileString('$DISCFILE','UserMaint','department') $MONTH=ReadProfileString('$DISCFILE','UserMaint','month') $DAY=ReadProfileString('$DISCFILE','UserMaint','day') $YEAR=ReadProfileString('$DISCFILE','UserMaint','year') $SEASONAL=ReadProfileString('$DISCFILE','UserMaint','seasonal') $NEEDCOMP=ReadProfileString('$DISCFILE','UserMaint','needcomp') $COMPTYPE=ReadProfileString('$DISCFILE','UserMaint','comptype') $SPECSOFT=ReadProfileString('$DISCFILE','UserMaint','specsoft') $EMAILACC=ReadProfileString('$DISCFILE','UserMaint','emailacc') $EMAILDISTLIST=ReadProfileString('$DISCFILE','UserMaint','emaildistlist') $YANTRAACC=ReadProfileString('$DISCFILE','UserMaint','yantraacc') $YANTRAGROUP=ReadProfileString('$DISCFILE','UserMaint','yantragroup') $SFDACC=ReadProfileString('$DISCFILE','UserMaint','sfdacc') $SFDPRINTER=ReadProfileString('$DISCFILE','UserMaint','sfdprinter') $CAPITALNUM=ReadProfileString('$DISCFILE','UserMaint','capitalnum') $CUBENUM=ReadProfileString('$DISCFILE','UserMaint','cubenum') $JACKNUM=ReadProfileString('$DISCFILE','UserMaint','jacknum') $ADDNOTES=ReadProfileString('$DISCFILE','UserMaint','addnotes') ;to do - Format 'proper' output for end user viewing!! $RC=Open(1,$OUTPUT,5) $RC=WriteLine(1,'UserName = '+@USERID+@CRLF+ 'asschoice = '+$ASSCHOICE+@CRLF+ 'manager = '+$MANAGER+@CRLF+ 'managertele = '+$MANAGERTELE+@CRLF+ 'assname = '+$ASSNAME+@CRLF+ 'company = '+$COMPANY+@CRLF+ 'department = '+$DEPARTMENT+@CRLF+ 'month = '+$MONTH+@CRLF+ 'day = '+$DAY+@CRLF+ 'year = '+$YEAR+@CRLF+ 'seasonal = '+$SEASONAL+@CRLF+ 'needcomp = '+$NEEDCOMP+@CRLF+ 'comptype = '+$COMPTYPE+@CRLF+ 'specsoft = '+$SPECSOFT+@CRLF+ 'emailacc = '+$EMAILACC+@CRLF+ 'emaildistlist = '+$EMAILDISTLIST+@CRLF+ 'yantraacc = '+$YANTRAACC+@CRLF+ 'yantragroup = '+$YANTRAGROUP+@CRLF+ 'sfdacc = '+$SFDACC+@CRLF+ 'sfdprinter = '+$SFDPRINTER+@CRLF+ 'capitalnum = '+$CAPITALNUM+@CRLF+ 'cubenum = '+$CUBENUM+@CRLF+ 'jacknum = '+$JACKNUM+@CRLF+ '----------------------------------'+@CRLF+ 'addnotes: = '+@CRLF+@CRLF+$ADDNOTES) $RC=Close(1) $CMD=@CURDIR+'\blat.exe '+$OUTPUT+ ' -t rcapra@@email.com -f '+ ;to do - use sos@@email.com in pruduction @USERID+'@@email.com'+ ' -s "User Maintenance Request ('+$ASSCHOICE+')"' SHELL $CMD ;----------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------- CASE($REQUEST='Tele Com') ;to do - EVERYTHING!! SHELL '%COMSPEC% /c kixwin "file://'+@CURDIR+'\_tele.html" "'+@USERID+'" > "'+$DISCFILE+'"' IF @ERROR = -1 QUIT(0) ENDIF ;----------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------- CASE(1)
ENDSELECT ;---------------------------------------------------------------------------------------- $RC=MessageBox('Your Request has been e-Mailed to SOS'+@CRLF+ 'Your issue will be taken care of in'+@CRLF+ 'the order it was recieved. You should'+@CRLF+ 'get a reply back from SOS with your'+@CRLF+ 'HelpStar Number so you can follow up.', 'HelpDesk! - by [ Rocco Capra ]',64) ;---------------------------------------------------------------------------------------- ; HEY LOOK HERE I GOT RID OF MY GOTO LOOP!!! ;oD ;$ID = 0 ;$PRINTERS2 = '[' ;:PRINTERS ;$PRINTERS=EnumValue('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices',$ID) ;IF @ERROR = 0 ; $PRINTERS2 = $PRINTERS2+$PRINTERS+'][' ; $ID = $ID+1 ; GOTO PRINTERS ;ENDIF ;----------------------------------------------------------------------------------------
Here's the _disc.html...
code:
<html style="width:600;height:405;system:no;help:no"> <head> <title>HelpDesk! - by [ Rocco Capra ]</title> <style> body { background-color:#CCCCCC;<!--|[#637A8C][#455969]|--> margin-left:1; margin-right:1; margin-top:4; color:#000000; FONT-FAMILY: Tahoma, sans-serif; } .button { width:75 } </style> </head> <body scroll=no onload()="body_onload()"> <div align="center"> <table align="center" width="575" cellpadding="1" border="0" cellspacing="0"> <tr> <td colspan="4"><font size="3">Please enter a description of the problem you are having. Please be as detailed as possible as to better equip IT to solve your issue in a timely manner.</font></td> </tr> <tr><td colspan="4"><hr></td></tr> <tr> <td colspan="4"><font size="2"><b>Do not use the "ENTER" key in the text area. Your message will be truncated if you do.</b></font></td> </tr> <tr> <td colspan="4" align="center"> <textarea name=discription id=discription cols="69" rows="15"></textarea> </td> </tr> <tr><td colspan="4"><HR></td></tr> <tr> <td align="right" colspan="4"> <input type=submit class=button onclick="ok.onclick()" value="Submit" valign=right name=ok> <input type=button class=button onclick="cancel.onclick()" value="Cancel" name=cancel> </td> </tr> </table> </div></body> <script> function body_onload() { var argv = new Array; argv = window.dialogArguments.split(";"); document.all.username.value = argv[0]; window.returnValue = -1; } function ok.onclick() { window.returnValue = "[HelpDesk]\ndisc="+discription.value;//+ // "\nprog="+prog.value+ // "\nprob="+prob.value; window.close(); } function cancel.onclick() { window.returnValue = -1; window.close(); } </script> </html>
Here's the _user.html...
code:
<html style="width:600;height:405;system:no;help:no"> <head> <title>HelpDesk! - by [ Rocco Capra ]</title> <style> body { background-color:#CCCCCC;<!--|[#637A8C][#455969]|--> margin-left:1; margin-right:1; margin-top:4; margin-bottom:8; color:#000000; FONT-FAMILY: Tahoma, sans-serif; } .button { width:75 } </style> </head> <body onload()="body_onload()"> <!--[ scroll=no ]--> <div align="center"> <table align="center" width="550" cellpadding="1" border="0" cellspacing="0"> <tr align="center"> <td colspan="4"><font size="3"><b>Note: Allow a minimum of one week for completion.<br> If a new computer is needed, please allow 3 - 4 weeks.</b></font> </td> </tr> <tr><td colspan="4"><hr></td></tr> <tr> <td colspan="2"><font size="2"><b>Request for: </b></font></td> <td colspan="2"> <select name="asschoice" id=asschoice> <option value="newass">New Associate</option> <option value="moveass">Existing Associate (move or replace)</option> <option value="termass">Terminated Associate</option> </select> </td> </tr> <tr><td colspan="4"><hr></td></tr> <tr> <td colspan="2"><font size="2">Requesting Manager: </font></td> <td colspan="2"><input type=text style="width:200" id=manager></td> </tr> <tr> <td colspan="2"><font size="2">Manager's Phone: </font></td> <td colspan="2"><input type=text style="width:200" id=managertele></td> </tr> <tr> <td colspan="2"><font size="2">Associate Name: </font></td> <td colspan="2"><input type=text style="width:200" id=assname></td> </tr> <tr> <td colspan="2"><font size="2">Company Name: </font></td> <td colspan="2"><input type=text style="width:200" id=company></td> </tr> <tr> <td colspan="2"><font size="2">Department Name: </font></td> <td colspan="2"><input type=text style="width:200" id=department></td> </tr>
<tr><td colspan="4"><HR></td></tr>
<tr> <td colspan="2"><font size="2">Requested Completion Date: </font></td> <td colspan="2"> <select name="month" id=month> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="day" id=day> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="year" id=year> <option value="2003">2003</option> <option value="2004">2004</option> </select> </td> </tr> <tr> <td colspan="2"><font size="2">Seasonal: </font></td> <td colspan="2"> <select name="seasonal" id=seasonal> <option value="no">No</option> <option value="yes">Yes </option> </select> </td> </tr> <tr> <td colspan="2"><font size="2">Does Associate Need a Computer: </font></td> <td colspan="2"> <select name="needcomp" id=needcomp> <option value="no">No</option> <option value="yes">Yes </option> </select> </td> </tr>
<tr><td colspan="4"><HR></td></tr>
<tr> <td colspan="4"><font size="2"><b>If A Computer Is Needed: </b></font></td> </tr> <tr> <td colspan="2"><font size="2">Computer Type: </font> <td colspan="2"> <select name="comptype" id=comptype> <option value="PC">PC</option> <option value="MAC">MAC</option> </select> </tr> <tr> <td colspan="2" valign="top"><font size="2"><b>Software:</b> </font></td> <td colspan="2"><font size="2"><b>Note:</b> Standard desktop includes; Word, Excel, Power Point, Internet Explorer, Acrobat Reader, WinZip, Outlook, and All Citrix Apps.</font></td> </tr> <tr> <td colspan="4"><font size="2"><b>Please List Special Software Needed: </b></font></td> </tr> <tr> <td colspan="2"><font size="2">Separate Software With A Comma: </font></td> <td colspan="2"><input type=text style="width:264" id=specsoft></td> </tr> <tr> <td colspan="2"><font size="2"><b>Additional Software Needed: </b></font></td> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><font size="2">eMail Access: </font></td> <td colspan="2"> <select name="emailacc" id=emailacc> <option value="no">No</option> <option value="yes">Yes </option> </select> </td> <tr> <td colspan="2"><font size="2">eMail Distribution list(s): </font></td> <td colspan="2"><input type=text style="width:264" id=emaildistlist></td> </tr> <tr> <td colspan="2"><font size="2">Yantra Access: </font></td> <td colspan="2"> <select name="yantraacc" id=yantraacc> <option value="no">No</option> <option value="yes">Yes </option> </select> <font size="2"> Group: </font> <select name="yantragroup" id=yantragroup> <option value="oe">OE</option> <option value="csr">CSR</option> <option value="batcheditor">Batch Editor </option> <option value="senior">Senior</option> <option value="teamlead">Team Lead</option> </select> </td> </tr> <tr> <td colspan="2"><font size="2">SFD Access: </font></td> <td colspan="2"> <select name="sfdacc" id=sfdacc> <option value="no">No</option> <option value="yes">Yes </option> </select> <font size="2">Default Printer: </font> <input type=text style="width:101" id=sfdprinter> </td> </tr> <tr> <td colspan="2"> </td> <td colspan="2"><font size="2"><b>Note:</b> If additional capabilities or security access is needed, please fill out in Additional Notes box below.</font></td> </tr> <tr><td colspan="4"><HR></td></tr> <tr> <td colspan="2"><font size="2">Capital Project Number: </font></td> <td colspan="2"><input type=text style="width:200" id=capitalnum></td> </tr> <tr> <td colspan="2"><font size="2">Location For PC (Cube#): </font></td> <td colspan="2"><input type=text style="width:200" id=cubenum></td> </tr> <tr> <td colspan="2"><font size="2">Jack Number For Computer: </font></td> <td colspan="2"><input type=text style="width:200" id=jacknum></td> </tr>
<tr> <td colspan="2" valign="top"><font size="2">Additional Notes: </font></td> <td colspan="2"><font size="2">Do not use the "ENTER" key in the text area. Your message will be truncated if you do.</font></td> </tr> <tr> <td colspan="2"> </td> <td colspan="2"><textarea name=addnotes id=addnotes cols="30" rows="4"></textarea></td> </tr> <!--[ <tr><td colspan="4"> </td></tr> ]--> <tr><td colspan="4"><HR></td></tr> <tr> <td align="right" colspan="4"> <input type=submit class=button onclick="ok.onclick()" value="Submit" valign=right name=ok> <input type=button class=button onclick="cancel.onclick()" value="Cancel" name=cancel> </td> </tr> </table> </div></body> <script> function body_onload() { var argv = new Array; argv = window.dialogArguments.split(";"); document.all.username.value = argv[0]; window.returnValue = -1; } function ok.onclick() { window.returnValue = "[UserMaint]\nasschoice="+asschoice.value+ "\nmanager="+manager.value+ "\nmanagertele="+managertele.value+ "\nassname="+assname.value+ "\ncompany="+company.value+ "\ndepartment="+department.value+ "\nmonth="+month.value+ "\nday="+day.value+ "\nyear="+year.value+ "\nseasonal="+seasonal.value+ "\nneedcomp="+needcomp.value+ "\ncomptype="+comptype.value+ "\nspecsoft="+specsoft.value+ "\nemailacc="+emailacc.value+ "\nemaildistlist="+emaildistlist.value+ "\nyantraacc="+yantraacc.value+ "\nyantragroup="+yantragroup.value+ "\nsfdacc="+sfdacc.value+ "\nsfdprinter="+sfdprinter.value+ "\ncapitalnum="+capitalnum.value+ "\ncubenum="+cubenum.value+ "\njacknum="+jacknum.value+ "\naddnotes="+addnotes.value; window.close(); } function cancel.onclick() { window.returnValue = -1; window.close(); } </script> </html>
Here's the _prom.html code...
code:
<html style="width:420;height:200;system:no;help:no"> <head> <title>HelpDesk! - by [ Rocco Capra ]</title> <style> body { background-color:#CCCCCC;<!--|[#637A8C][#455969]|--> margin-left:1; margin-right:1; margin-top:4; color:#000000; FONT-FAMILY: Tahoma, sans-serif; } .button { width:75 } </style> </head> <body scroll=no onload()="body_onload()"> <div align="center"> <table width="400" cellpadding="1" border="0" cellspacing="0"> <tr> <td colspan="4"><font size="2"><b>Please make the appropriate selection from the menu:</b></font></td> </tr> <tr><td colspan="4"><hr></td></tr> <tr align="center"> <td colspan="2" width="200"><b><font size="2">Request Type-></font></b></td> <td colspan="2" width="200"> <select name="request" id=request> <option value="PC Support">Computer Support Request</option> <option value="New User">User Maintenance Request</option> <option value="Tele Com">TeleCom Request</option> </select> </td> </tr> <tr><td colspan="4"> </td></tr> <tr><td colspan="4"> </td></tr> <tr> <td align="right" colspan="4"> <HR> <input type=submit class=button onclick="ok.onclick()" value="Submit" valign=right name=ok> <input type=button class=button onclick="cancel.onclick()" value="Cancel" name=cancel> </td> </tr> </table> </div></body> <script> function body_onload() { var argv = new Array; argv = window.dialogArguments.split(";"); document.all.username.value = argv[0]; window.returnValue = -1; } function ok.onclick() { window.returnValue = "[HelpDesk]\nrequest="+request.value;//+ // "\nprog="+prog.value+ // "\nprob="+prob.value; window.close(); } function cancel.onclick() { window.returnValue = -1; window.close(); } </script> </html>
Dam I just broke the long line rule
Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|