Remove Trailing Backslash – VBScript



On Error Resume Next


Dim strNewValue, Path, slash


       Path = InputBox(“Enter Folder Path”, “Please Enter”, “”)


       slash = Len(DatabasePath1)-1


       strNewValue = mid(Path, 1, slash)


msgbox StrNewValue

Advertisements

Citrix License Administration Console

When you launch the shortcut “License Administration Console” you will receive following Error.



It looks like its a but, However, tTo access Citrix License Administration Console, type the following URL in your browser


http://localhost:8082

JQuery Online Training



jQuery training is meant for the web developers and website designers. You can use jQuery with all the web development technologies such as  PHP, JSP, ASP, .NET, CGI-PERL, Struts, JSF etc. So, jQuery training is equally important for web developers.


Pre-Requisites: Basic knowledge of HTML, JavaScript


Course Contents:


1)  Introduction
2)  jQuery basics
3)  jQuery selectors

  •       Id, class, element selectors

4)  jQuery call back functions
5)  jQuery DOM Attributes
6)  jQuery DOM Traversing
7)  jQuery CSS Methods
8)  jQuery DOM Manipulation methods
  • Content manipulation
  • DOM Element replacement
  • Removing DOM Elements
  • Inserting DOM Elements

9)  jQuery – Events Handling
  • Event object
  • Event Helper methods
  • bind() and unbind()
  • live() and delegate()

10)   jQuery – Effects (Animations)
  • jQuery Effect methods like hide(),show()
  • toggle(),slideDown(),slideUp(),slideToggle(), fadeIn(), fadeOut()
  • fadeTo()
  • jQuery custom animations

11)   jQuery – Ajax
  • load()
  • get() and post()
  • getJSON()
  • ajax()

12)  Form validation using jQuery
  • Basic form validation
  • Custom validations

    13)   jQuery UI Plugin
i)         Interactions
Draggable, Droppable, Resizeable, Selectable, Sortable
ii)        Widgets
Accordion, Datepicker, Progressbar, Dialog, Slider, Tabs
iii)       Effects
iv)        Add Class, Remove class, Toggle class, Switch class, hide, show , toggle, color animation



For Details Please Contact Arjun@Apprepack.in or +91-9963678795

JQuery Training by Matrix


jQuery training is meant for the web developers and website designers. You can use jQuery with all the web development technologies such as  PHP, JSP, ASP, .NET, CGI-PERL, Struts, JSF etc. So, jQuery training is equally important for web developers.

Pre-Requisites: Basic knowledge of HTML, JavaScript

Course Contents:

1)  Introduction

2)  jQuery basics

3)  jQuery selectors

  •       Id, class, element selectors

4)  jQuery call back functions

5)  jQuery DOM Attributes

6)  jQuery DOM Traversing

7)  jQuery CSS Methods

8)  jQuery DOM Manipulation methods

  • Content manipulation
  • DOM Element replacement
  • Removing DOM Elements
  • Inserting DOM Elements

9)  jQuery – Events Handling 

  • Event object
  • Event Helper methods
  • bind() and unbind()
  • live() and delegate()

10)   jQuery – Effects (Animations) 

  • jQuery Effect methods like hide(),show()
  • toggle(),slideDown(),slideUp(),slideToggle(), fadeIn(), fadeOut()
  • fadeTo()
  • jQuery custom animations

11)   jQuery – Ajax 

  • load()
  • get() and post()
  • getJSON()
  • ajax() 

12)  Form validation using jQuery 

  • Basic form validation
  • Custom validations

13)   jQuery UI Plugin

    i)         Interactions

      Draggable, Droppable, Resizeable, Selectable, Sortable

    ii)        Widgets

      Accordion, Datepicker, Progressbar, Dialog, Slider, Tabs

    iii)       Effects

     iv)        Add Class, Remove class, Toggle class, Switch class, hide, show , toggle, color animation

 

For Details Please Contact Arjun@Apprepack.in or +91-9963678795

SCCM 2007 Training – August Batch

New batch of SCCM 2007 Online Training starting from 4th August 2012

Course Duration: 1 Month

visit  http://apprepack.in/sccm_training.htm  for more information on training topics.

Reach us on +91-9963678795 or contact@apprepack.in for enquiries

Get RAM Size – VBSCript

Following script displays the RAM present on a system

Option Explicit
Dim objWMIService, objComputer, colComputer 
Dim strLogonUser, strComputer 


strComputer = “.”   
Set objWMIService = GetObject(“winmgmts:”& “{impersonationLevel=impersonate}!\\”& strComputer & “\root\cimv2”) 
Set colComputer = objWMIService.ExecQuery(“Select * from Win32_ComputerSystem”) 


For Each objComputer in colComputer 
Wscript.Echo “System Name: ” & objComputer.Name & vbCr & “Total RAM ” & objComputer.TotalPhysicalMemory/(1024*1024)
Next 


WScript.Quit 

Reboot System – VBScript

set sh=createobject(“wscript.shell”)


set fso=createobject(“scripting.filesystemobject”)
Dim a
a=MsgBox(“Do you want to Reboot your system”,4,”Application Name”)
If a=6 Then


MsgBox “yes was clicked”
sh.Run “shutdown -r”


End if

Get Files in a Folder – VBScript

Following script displays all the files present in a folder
Change the folder name in oFolder

Dim oFSO, oFile, oFolder


Set oFSO = CreateObject(“Scripting.FileSystemObject”)
Set oFolder = oFSO.GetFolder(“C:\Sample”)


For Each oFile in oFolder.Files
 MsgBox oFile.Name
Next

Remove Excel Addin – VBScript

Following VBScript can be used to delete Excel Addin
Change AddIn_path to the Excel Addin file that needs to be removed

Set objArg = WScript.Arguments
AddIn_path = objArg(0)
AddIn_path = “C:\Program Files\FO PROD\SalesXL.xla”

strKeyPath = “”
oReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
    ‘msgbox subkey

strKeyPath = subkey & “\SOFTWARE\Microsoft\Office\11.0\Excel\Options”

oReg.EnumValues HKEY_USERS, strKeyPath,_
arrValueNames, arrValueTypes

X = “””” & AddIn_path & “””” 

For i=0 To UBound(arrValueNames)

oReg.GetStringValue HKEY_USERS,strKeyPath,arrValueNames(i),strValue

If (left(arrValueNames(i), 4) = “OPEN”) Then
  If strValue = x  Then
oReg.DeleteValue HKEY_USERS,strKeyPath,arrValueNames(i)
‘msgbox strKeyPath & “\” & arrValueNames(i)
End If
End If   

Next
Next

Set Excel Addin – VBScript

Following script can be used to set Excel Addin
Chabge Addin_Path value to the path of XLA file of Excel Addin that needs to be set

On Error resume next
Const HKEY_CURRENT_USER = &H80000001
const REG_SZ = 1
const REG_EXPAND_SZ = 2
const REG_BINARY = 3
const REG_DWORD = 4
const REG_MULTI_SZ = 7


Set objArg = WScript.Arguments
AddIn_path = objArg(0)
AddIn_path = “C:\Program Files\FO PROD\salesXL.xla”


strComputer = “.”

Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” &_ 
strComputer & “\root\default:StdRegProv”)

strKeyPath = “SOFTWARE\Microsoft\Office\11.0\Excel\Options”
oReg.Createkey HKEY_CURRENT_USER,strKeyPath
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,”EXAddin”,1




oReg.EnumValues HKEY_CURRENT_USER, strKeyPath,_
 arrValueNames, arrValueTypes


n = 1
X = “””” & AddIn_path & “””” 
For i=0 To UBound(arrValueNames)


oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,arrValueNames(i),strValue  

If (left(arrValueNames(i), 4) = “OPEN”) Then
n = n +1    

If strValue = x  Then
‘msgbox strValue
n = 0
Exit For
End If 
End If   


Next


If n <> 0 Then
n = n -1
If n = 0 Then
   
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,”OPEN”,x
Else 
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,”OPEN” & n,x
End If 


End If