Johnfaw Posted June 11, 2011 Share Posted June 11, 2011 I have a kiosk type machine that I am trying to delay the execution of the userinit until after another program executes. Created a small Auotit script that checks for the presence of a window, sleeps for 3 minutes then launches the userinit. Its a kiosk type machine and I dont want the users to be able to touch the start button until after a batch program runs. The batch progam controls the touch screen after it loads. Users do not have access to a keyboard or mouse. All interaction is thru the touchscreen. I dont want then to be navigating via the start button until the batch program fully loads and controls the touchscreen. The script is: WinWaitActive("CSC-W32") sleep (1800000) Run("explorer.exe") Exit The script works as expected on my test machine but not on the production machine. On the production machine Explorer never gets executed. I have also tried WinWait and WinWaitNotActive but to no avail. The batch program on the production machine opens numerous Windows. I have tried to simulate on the test machine by opening numerous windows when testing. Always works on the test but wont work on the production. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 11, 2011 Share Posted June 11, 2011 This may help, or not, but try adding the #RequireAdmin keyword to your script. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
MHz Posted June 11, 2011 Share Posted June 11, 2011 (edited) So that is 3 minutes sleep. Seems long time. You might be better to use HKCU Run key to wait and then hide the start button, via hiding the task bar using the class name so they can not click start to access anything with the mouse. You could also set a shutdown script to reset the registry key to your script in case they delete the registry key during the session. Edit: LogOff script rather then Shutdown script may suit better through GPO. Edited June 11, 2011 by MHz Link to comment Share on other sites More sharing options...
Johnfaw Posted June 11, 2011 Author Share Posted June 11, 2011 Thanks for the responses. I will investigate the the HKCU option and hiding the Start button. The users do not have access to a keyboard or mouse,they only use the touchscreen. Link to comment Share on other sites More sharing options...
guinness Posted June 11, 2011 Share Posted June 11, 2011 Have a look at _Startup to some sort of idea, it's in my signature. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Johnfaw Posted June 12, 2011 Author Share Posted June 12, 2011 This is solved. Used the blank quotes thus for the WinWaitActive("") and it worked like a charm. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now