Make Changes to NT Server While Screensaver Runs
Keywords: screensaver
I found that the best way for me to make changes to an NT Server (while the NT screen saver was running) was to make excessive use of the functions in the Control Manager extender. While this extender requires a better knowledge of the background workings of the GUI, it also allows you to do more.You need to automatically remove the NWLink protocol from multiple servers but the screen saver is running. It is assumed that you have a method of delivering the script or a compiled EXE to the server and then running the script or EXE. It checks for the existence of the protocol before it removes it. This sample code requires the Control Manager extender.
A working script to remove the NWlink protocol is below:
;WinBatch script to remove NWLINK ipx/spx protocols AddExtender("wwctl34I.dll") Run("rundll32.exe", "shell32.dll,Control_RunDLL ncpa.cpl") netwnd=DllHwnd("Network") tabtitle="Protocols" systabwnd=cWndByClass(netwnd,"SysTabControl32") cSetTabItem(systabwnd,3) Protwnd = cWndByName(netwnd,tabtitle) SysListBox = cWndByID(Protwnd,2012) Descwnd = cWndByID(Protwnd,2004) Desc = cWndInfo( Descwnd, 0) ret = strcmp(Desc,"An implementation of the IPX and SPX protocols, which are used by the NetWare networks.") while ret != 0 cSendMessage(SysListBox, 258, 78, 0) Descwnd = cWndByID(Protwnd,2004) Desc = cWndInfo( Descwnd, 0) ret = strcmp(Desc,"An implementation of the IPX and SPX protocols, which are used by the NetWare networks.") endwhile RemoveBtnhwnd = cWndByID(Protwnd,2002) cSendMessage(RemoveBtnhwnd,258,82,0) cPostButton(RemoveBtnhwnd) TimeDelay(5) DialogHwnd =DllHwnd("Warning") YesBtnhwnd = cWndByID(DialogHwnd,6) ; 6 is yes cPostButton(YesBtnhwnd) csendmessage(DialogHwnd,258,89,0) Timedelay(5) CloseBtnhwnd =cWndByName(netwnd,"Close") cPostButton(CloseBtnhwnd) TimeDelay(20) DialogHwnd =DllHwnd("Network Settings Change") NoBtnhwnd = cWndByID(DialogHwnd,7) ; 7 is no cPostButton(NoBtnhwnd) exit
Article ID: W13788Filename: Make Change to NT Server While Screensaver Runs.txt