XNeat Scripting Documentation
XNeat could be scripted using Visual Basic Script or JScript. so to start you have to:
Now lets write down our first script
Now lets write our installer
It simply add HelloWorld.vbs to the registry then call XNScript.ReloadScripts
In the last three lines you will notice that we get a handle to XNeat by calling WScript.CreateObject("XNeat.Core") then we call ReloadScripts method inorder to reload all the scripts again so our script got loaded.
The last step, the uninstaller.
Same as install.vbs but this time we delete the registry entry we previously added.
Clicking install.vbs will install HelloWorld.vbs. which simply shows a MessageBox every time XNeat is loaded. to uninstall HelloWorld.vbs simply click uninstall.vbs, Tutorial finished!
You can find here the above files mentioned in the tutorial
HelloWorld.vbs : our script we want to add
Install.vbs : our installer it simply add HelloWorld.vbs to the registry then call XNScript.ReloadScripts
UnInstall.vbs : our uninstaller it simply delete HelloWorld.vbs from the registry then call XNScript.ReloadScripts
- Write down your own Script and save it as .vbs file if it is a Visual Basic Script or .js if it is a JScript
- Create a new string value under this registry key HKEY_CURRENT_USER\Software\XNeat Windows Manager\Plugins\scripts containing your script path.
- Call XNScript.ReloadScripts to reload all the scripts
Now lets write down our first script
MsgBox "Hello World"Save the above code as HelloWorld.vbs. It is a simple vbs file that show a message box message !
Now lets write our installer
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
strKeyPath = "HKCU\Software\XNeat Windows Manager\Plugins\scripts\"
WSHShell.RegWrite strKeyPath & "HelloWorld" , Replace(WScript.ScriptFullName,WScript.ScriptName,"HelloWorld.vbs")
Dim XNScript
Set XNScript = WScript.CreateObject("XNeat.Core")
XNScript.ReloadScripts
Save the above code as install.vbs
It simply add HelloWorld.vbs to the registry then call XNScript.ReloadScripts
In the last three lines you will notice that we get a handle to XNeat by calling WScript.CreateObject("XNeat.Core") then we call ReloadScripts method inorder to reload all the scripts again so our script got loaded.
The last step, the uninstaller.
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
strKeyPath = "HKCU\Software\XNeat Windows Manager\Plugins\scripts\"
WSHShell.RegDelete strKeyPath & "HelloWorld"
Dim XNScript
Set XNScript = WScript.CreateObject("XNeat.Core")
XNScript.ReloadScripts
Save the above code as uninstall.vbs
Same as install.vbs but this time we delete the registry entry we previously added.
Clicking install.vbs will install HelloWorld.vbs. which simply shows a MessageBox every time XNeat is loaded. to uninstall HelloWorld.vbs simply click uninstall.vbs, Tutorial finished!
You can find here the above files mentioned in the tutorial
HelloWorld.vbs : our script we want to add
Install.vbs : our installer it simply add HelloWorld.vbs to the registry then call XNScript.ReloadScripts
UnInstall.vbs : our uninstaller it simply delete HelloWorld.vbs from the registry then call XNScript.ReloadScripts