Jump to content

create a window toolbar and docked it on the right side of the screen


Recommended Posts

Guys and Gals,

I been researching and not been able to figure out a script processes to make it work.

In windows if you take a folder and drag it to the right side of the screen it becomes

a toolbar and then can be set to auto-hide. Is there a method to do this with WinAPi

of Yashied's Extended WinAPi functions? To reduce the issue just to turn on the desktop toolbar

would work as well.

Thanks in advance,

Roger

Link to comment
Share on other sites

You could use WinAPIEx.au3, but from what you want to do most of the Functions are either native in AutoIt OR in the WinAPI UDF.

You seem pretty competent in AutoIt :) so I will give you an idea of how I might go about it...

1. Monitor the Mouse using _IsPressed(), when the left mouse is down Send() Ctrl + C to Copy the Folder to the ClipBoard, then grab the Folder Name using ClipGet()

2. Wait for a release of the Mouse in a While...WEnd Loop.

3. Check where the Mouse was released using MouseGetPos() and @DesktopWidth/@DesktopHeight determine if this was at the side of the Screen.

4. If it was take the Folder Name you got from ClipGet() and create a PopUp GUI!

Note: I haven't tested and can't guarantee success.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Thanks for your input, I was looking for more a script to interface with the windows environment to create a toolbar and configure the toolbar with what I want to have (what shortcuts) and then mount it on the right side and sets it's properties to auto-hide. Basically get away from having to create and manage a launchbar,and just use windows to do it for me.

Roger

Link to comment
Share on other sites

I was able to perfrom the following which creates a tray launcher, but it is not the desired approach. What I looking to do is to have desktop shortcuts and if a program is running that the user can use a toolbar launcher to open another shortcut. Except I do not want to have to manage a process just use Window to create the toolbar and I can populate the toolbar with the shortcuts I want and make it dock to the right side and auto-hide.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=launchbar.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Constants.au3>
#include <sso.au3>
#include <Constants.au3>

Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)

If $cmdline[0] = "" Then
    Msgbox(1,"Syntax Error","You must define a unique user.")
    Exit
Else
        $AD_USERNAME = $cmdline[1]
EndIf

Global $xsocredentials
$auto = @AutoItExe
Global $scriptpath = "\\dtescanmgmt\apps\"
Global Const $MIM_APPLYTOSUBMENUS   = 0x111111
Global Const $MIM_BACKGROUND        = 0xFFFFFF
Global $AppArray[1]
CreateTrayItems()

While 1
    sleep(100)
WEnd

Func SetMenuColor($nMenuID, $nColor)
                $hMenu  = TrayItemGetHandle($nMenuID) ; Get the internal menu handle
                $hBrush = DllCall("gdi32.dll", "hwnd", "CreateSolidBrush", "int", $nColor)
                $hBrush = $hBrush[0]
                Local $stMenuInfo = DllStructCreate("dword;dword;dword;uint;dword;dword;ptr")
                DllStructSetData($stMenuInfo, 1, DllStructGetSize($stMenuInfo))
                DllStructSetData($stMenuInfo, 2, BitOr($MIM_APPLYTOSUBMENUS, $MIM_BACKGROUND))
                DllStructSetData($stMenuInfo, 5, $hBrush)
                DllCall("user32.dll", "int", "SetMenuInfo", "hwnd", $hMenu, "ptr", DllStructGetPtr($stMenuInfo))
EndFunc

Func CreateTrayItems()

                Dim $AppArray
                _GetAppList()
                For $i = 1 To UBound($AppArray) -1
                    $AppArray[$i] = TrayCreateItem($AppArray[$i])
                    TrayItemSetOnEvent(-1, "_TrayEvents")
                Next

                $TrayItem_Exit = TrayCreateItem("Exit")
                TrayItemSetState(-1, $TRAY_DEFAULT)
                TrayItemSetOnEvent(-1, "_Exit")
EndFunc

Func _Exit()
    Exit
EndFunc   ;==>_Exit

Func _TrayEvents(); runs the script file chosen
    TrayItemSetState(@TRAY_ID,$TRAY_UNCHECKED)
    $v = TrayItemGetText(@TRAY_ID)
    $a = FileGetShortName($v, 1)
    Run($scriptpath&$a&".exe"&" "&$AD_USERNAME)
EndFunc

I was able to create desktop shortcuts, but still limiting

#include <Constants.au3>
#include <sso.au3>
#include <Constants.au3>

Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)

If $cmdline[0] = "" Then
    Msgbox(1,"Syntax Error","You must define a unique user.")
    Exit
Else
        $AD_USERNAME = $cmdline[1]
EndIf

$ldapsvr=RegRead("HKLM\Software\Xyloc\XSO", "LdapServer")
Global $svrfilepath = "\\"&$ldapsvr&"\apps\"
Global $cltfilepath = "C:\Program Files\Xyloc\XSO\Bin\"
_GetAppList()
For $i = 1 To UBound($AppArray) -1
    If FileExists($cltfilepath& "\"&$AppArray[$i]&".exe") Then
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",@DesktopDir & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")
    Else
        FileCopy($svrfilepath&$AppArray[$i]&".exe",$cltfilepath)
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",@DesktopDir & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")
    EndIf
Next
Exit
Link to comment
Share on other sites

OK, I have to say that I can't think right now of any API calls you could call to achieve what you are looking for.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

A Step closer,

If I create the toolbar manually and set it up and export out from the registry the key for the Toolbar I have the settings, but I cannot seem to apply them before the system changes it. Windows writes the current settings to the key and over write the setting I imported with regedit. If there was a way to write the settings to teh key before Windows reads during user login it should work. Any ideas with this type of idea?

Thanks,

Roger

Code to write the regedit

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "CreateDestopToolbar", "REG_SZ", "C:\WINDOWS\regedit.exe /s -s C:\Program Files\Xyloc\XSO\Data\desktoptoolbar.reg")

desktoptoolbar.reg which docks the desktop toolbar to the right side and has auto-hide enabled.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]
"TaskbarWinXP"=hex:0c,00,00,00,08,00,00,00,02,00,00,00,00,00,00,00,aa,4f,28,68,\
  48,6a,d0,11,8c,78,00,c0,4f,d9,18,b4,be,04,00,00,e0,0c,00,00,00,00,00,00,18,\
  00,00,00,00,00,00,00,00,00,00,00,18,00,00,00,00,00,00,00,01,00,00,00,01,00,\
  00,00,8b,8a,0d,54,3f,1c,32,4e,81,32,53,0f,6a,50,20,90,38,00,00,00,e0,04,00,\
  00,00,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,18,00,00,00,00,00,00,00,\
  01,00,00,00
"Toolbars"=hex:11,00,00,00,01,00,00,00,00,00,00,00,41,8a,cf,3c,85,5c,d0,11,97,\
  96,00,aa,00,b9,0a,df,08,00,00,00,01,00,00,00,4c,00,00,00,08,00,00,00,0a,00,\
  00,00,50,00,00,00,50,00,00,00,5e,00,00,00,50,00,00,00,f7,04,00,00,ea,01,00,\
  00,1d,06,00,00,16,03,00,00,ee,02,00,00,a9,01,00,00,01,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,58,00,00,00,2f,03,00,00,0c,00,00,00,08,00,00,00,01,\
  00,00,00,00,00,00,00,b0,e2,2b,d8,64,57,d0,11,a9,6e,00,c0,4f,d7,05,a2,22,00,\
  1c,00,08,10,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00,00,00,00,00,00,46,81,00,00,00,\
  10,00,00,00,40,80,f5,75,bd,4e,cb,01,ad,ea,c9,7c,94,de,cb,01,a2,62,b7,ce,93,\
  de,cb,01,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,02,00,00,00,60,00,00,00,03,00,00,a0,58,00,00,00,00,00,00,00,64,74,65,\
  73,63,61,6e,6d,67,6d,74,00,00,00,00,00,2e,8e,d3,92,1e,4c,b5,42,9d,98,59,39,\
  dc,de,9c,fd,e0,6b,ec,d4,06,cb,df,11,a6,66,00,0f,fe,f6,fa,5c,2e,8e,d3,92,1e,\
  4c,b5,42,9d,98,59,39,dc,de,9c,fd,e0,6b,ec,d4,06,cb,df,11,a6,66,00,0f,fe,f6,\
  fa,5c,00,00,00,00,00,00,00,00,e0,06,00,00,00,00,00,00,48,00,00,00,00,00,00,\
  00,00,00,00,00,58,00,00,00,00,00,00,00,01,00,00,00
"Upgrade"=dword:00000001
Link to comment
Share on other sites

Workaround was found: But maybe some of you would have a better way of doing:

So maybe this should be tiled how to create a Launchbar without having to manage or control it with Auoit?? no GuiCreate commands just Reg Hackit, put you still need Autoit to populate the folder it points too!

Okay the first part requires that you disable Windows SaveSettingsonExit Registry setting on your target workstations:

RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoSaveSettings","REG_DWORD","1")
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce","ImportToolbar","REG_SZ","C:\Program Files\Toolbar\Bin\ToolbarReg.exe")
run("logoff.exe")

The ToolbarReg.exe code is as follows:

Run("C:\WINDOWS\regedit.exe"&" "&"/s"&" "&"-s"&" "&"C:\Program File\Toolbar\Data\toolbar.reg")
run("logoff.exe")

A final logoff.exe and logon will bring up the toolbar.

How to create registry file for import: Create your custom toolbar and export out the settings from the registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]
"TaskbarWinXP"=hex:0c,00,00,00,08,00,00,00,02,00,00,00,00,00,00,00,aa,4f,28,68,\
  48,6a,d0,11,8c,78,00,c0,4f,d9,18,b4,02,05,00,00,e0,0c,00,00,00,00,00,00,18,\
  00,00,00,00,00,00,00,00,00,00,00,18,00,00,00,00,00,00,00,01,00,00,00,01,00,\
  00,00,8b,8a,0d,54,3f,1c,32,4e,81,32,53,0f,6a,50,20,90,2f,00,00,00,e0,04,00,\
  00,00,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,18,00,00,00,00,00,00,00,\
  01,00,00,00
"Toolbars"=hex:11,00,00,00,01,00,00,00,00,00,00,00,41,8a,cf,3c,85,5c,d0,11,97,\
  96,00,aa,00,b9,0a,df,08,00,00,00,01,00,00,00,4c,00,00,00,08,00,00,00,02,00,\
  00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,f6,04,00,00,1b,02,00,\
  00,1a,06,00,00,47,03,00,00,ee,02,00,00,a9,01,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,4a,00,00,00,2f,03,00,00,0c,00,00,00,08,00,00,00,01,\
  00,00,00,00,00,00,00,b0,e2,2b,d8,64,57,d0,11,a9,6e,00,c0,4f,d7,05,a2,22,00,\
  1c,00,08,10,00,00,ff,ff,ff,ff,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00,00,00,00,00,00,46,81,00,00,00,\
  10,00,00,00,f1,1d,aa,99,a0,de,cb,01,8f,5b,9c,b1,a1,de,cb,01,6d,25,7e,78,a1,\
  de,cb,01,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,23,01,14,00,1f,50,e0,4f,d0,20,ea,3a,69,10,a2,d8,08,00,2b,30,30,9d,19,\
  00,2f,43,3a,5c,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,4a,\
  00,31,00,00,00,00,00,69,3e,6b,80,11,00,50,52,4f,47,52,41,7e,31,00,00,32,00,\
  03,00,04,00,ef,be,a3,3c,97,61,69,3e,a3,aa,14,00,00,00,50,00,72,00,6f,00,67,\
  00,72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,00,00,18,00,36,00,\
  31,00,00,00,00,00,62,3e,23,ba,10,00,58,79,6c,6f,63,00,22,00,03,00,04,00,ef,\
  be,62,3e,23,ba,69,3e,34,ab,14,00,00,00,58,00,79,00,6c,00,6f,00,63,00,00,00,\
  14,00,30,00,31,00,00,00,00,00,69,3e,49,ab,10,00,58,53,4f,00,1e,00,03,00,04,\
  00,ef,be,62,3e,23,ba,69,3e,49,ab,14,00,00,00,58,00,53,00,4f,00,00,00,12,00,\
  44,00,31,00,00,00,00,00,69,3e,0b,ac,10,00,58,53,4f,54,4f,4f,7e,31,00,00,2c,\
  00,03,00,04,00,ef,be,69,3e,44,ab,69,3e,0d,ac,14,00,00,00,78,00,73,00,6f,00,\
  74,00,6f,00,6f,00,6c,00,62,00,61,00,72,00,00,00,18,00,00,00,10,00,00,00,05,\
  00,00,a0,26,00,00,00,77,00,00,00,60,00,00,00,03,00,00,a0,58,00,00,00,00,00,\
  00,00,64,74,65,73,63,61,6e,30,31,00,00,00,00,00,00,00,4e,56,1e,99,d9,f8,61,\
  4b,ae,02,01,ff,0f,c6,ae,48,92,5e,a3,92,37,40,e0,11,9c,a8,00,50,56,c0,00,08,\
  4e,56,1e,99,d9,f8,61,4b,ae,02,01,ff,0f,c6,ae,48,92,5e,a3,92,37,40,e0,11,9c,\
  a8,00,50,56,c0,00,08,00,00,00,00,00,00,00,00,e0,06,00,00,00,00,00,00,2c,00,\
  00,00,00,00,00,00,00,00,00,00,4a,00,00,00,00,00,00,00,01,00,00,00
"Upgrade"=dword:00000001

Here the code to populate the folder to populate the toolbar and creates desktop Icons:

#include <Constants.au3>
#include <sso.au3>
#include <Constants.au3>

Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)

If $cmdline[0] = "" Then
    Msgbox(1,"Syntax Error","You must define a unique user.")
    Exit
Else
        $AD_USERNAME = $cmdline[1]
EndIf

$ldapsvr=RegRead("HKLM\Software\Xyloc\XSO", "LdapServer")
Global $svrfilepath = "\\"&$ldapsvr&"\apps\"
Global $cltfilepath = "C:\Program Files\Xyloc\XSO\Bin\"
Global $xsotoolbar = "C:\Program Files\Xyloc\XSO\XSOToolbar"
_GetAppList()
For $i = 1 To UBound($AppArray) -1
    If FileExists($cltfilepath& "\"&$AppArray[$i]&".exe") Then
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",@DesktopDir & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",$xsotoolbar & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")

    Else
        FileCopy($svrfilepath&$AppArray[$i]&".exe",$cltfilepath)
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",@DesktopDir & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")
        FileCreateShortcut($cltfilepath& "\"&$AppArray[$i]&".exe",$xsotoolbar & "\"&$AppArray[$i]&".lnk",$cltfilepath,$AD_USERNAME,"XSO Client Link","\\"&$ldapsvr&"\icons\"&$AppArray[$i]&".ico")

    EndIf
Next
Exit
Link to comment
Share on other sites

Link to comment
Share on other sites

Interesting topic :). Found a good article on this one on codeproject.com.

Docking Toolbars in Plain C

http://www.codeproject.com/KB/toolbars/dockwnd.aspx

Great Article, Kinda outside my abilities. I did figure out a way to stream line my process to change the registry without all the logoffs

$ldapsvr=RegRead("HKLM\Software\Xyloc\XSO", "LdapServer")
Global $svrfilepath = "\\"&$ldapsvr&"\Apps\"
DirCreate("C;\Program Files\Xyloc\XSO\XsoToolBar\")
DirCreate("C;\Program Files\Xyloc\XSO\Data\")

$SaveSet = RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoSaveSettings")
If $SaveSet = 1 Then
SetSaveSettings(1)
Else
    SetXSOToolbar()
EndIf

Func SetSaveSettings($a)
        RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoSaveSettings","REG_DWORD",$a)
        ProcessClose("Explorer.exe")
        ProcessWaitClose("Explorer.exe")
        SetXSOToolbar()
EndFunc

Func SetXSOToolbar()
        Run("C:\WINDOWS\regedit.exe"&" "&"/s"&" "&"-s"&" "&$svrfilepath&"xsotoolbar.reg")
        ProcessClose("Explorer.exe")
        ProcessWaitClose("Explorer.exe")
EndFunc
Exit
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...