cocjh1 Posted October 29, 2007 Share Posted October 29, 2007 Sorry, being a bit think here, but how can I envoke an application on first logon for each new user? This is after an unattended install, and following an admin adding a new user, and that user then logs in.. Want a kind of RunOnceEx in the default current user hive... but that doesn't work Note the application is the Nvidia desktop Manager. Want it to automatically be enabled for all users in the system without their intervention. Commands are from here:http://www.msfn.org/board/nVidia_Drivers_D...ion_t96836.htmlbut are basically:rundll32.exe nview.dll nViewCmd ponrundll32.exe nview.dll nViewCmd loadprofile dualview allThanks,Chris Link to comment Share on other sites More sharing options...
zorphnog Posted October 29, 2007 Share Posted October 29, 2007 Have you tried adding it to RunOnce instead of RunOnceEx. Adding it to the default user hive should work. Link to comment Share on other sites More sharing options...
cocjh1 Posted October 30, 2007 Author Share Posted October 30, 2007 Yes, of course! RunOnce is the way Was getting hung up about how the reg key got deleted, so only thought about using RunOnceEx...Thanks for your help. Link to comment Share on other sites More sharing options...
cocjh1 Posted October 30, 2007 Author Share Posted October 30, 2007 (edited) After some more searching found this thread:http://www.msfn.org/board/RunOnceEx_regist...ded#entry374611RunOnceEx is not available in Current User, only in Local Machine.I've got round my problem by creating a batch file with the commands above and sticking a short-cut link in the default users profile. At the end of the batch file the short-cut is deleted.Running the above from RunOnce cause problems as suppose they need the explorer shell to exist.Anyways, all the answers are in this forum, if you know where to look Thanks.. Edited October 30, 2007 by cocjh1 Link to comment Share on other sites More sharing options...
bigfatroundguy Posted November 20, 2007 Share Posted November 20, 2007 This method seems to work well enough for me.1) So through RunOnceEx.cmd, i load the following cmdREG ADD %KEY%\990 /VE /D "Tuning User Environments" /fREG ADD %KEY%\990 /V 1 /D "RunHiddenConsole /w \"H:\temp\User Configuration\User Configuration at SU.cmd\"" /f2) this command loads the default user with:: cmdow @ /HID@echo offSET HKUC=HKEY_USERS\Custom\Software\Microsoft\Windows\CurrentVersion\RunOnce:: Load HKU with Default User profileREG LOAD HKEY_USERS\Custom "%HomeDrive%\Documents and Settings\Default User\NTUSER.dat"REG ADD "%HKUC%" /v "pg_00" /t REG_EXPAND_SZ /d "\"H:\temp\User Configuration\User Configuration at SU.exe\"" /f:: UnLoad HKU of Default User profileREG UNLOAD HKU\CustomEXIT3) the User Configuration at SU is a compiled AU3 script that uses a case statement to customize for username; ----------------------------------------------------------------------------; AutoIt Version: 3.1.1; Language: English; Platform: Win9x/NT; Author: ;; Script Function:; Configures Office per User at User Startup;; ----------------------------------------------------------------------------HotKeySet("^!x", "MyExit"); Script Start - Add your code below here; ----------------------------------------------------------------------------; Configure Office per User at User Startup; Toggle Rate$i = 500Sleep($i)Select Case @UserName = "Administrator"; Do Nothing Case @UserName = "User1" SplashTextOn("Active Processes", "office-User2", 200, 100, 0, 150, 4, "", 9) Sleep(1000) SplashOff() RunWait(@ScriptDir & "\office-User2\Config & Files Placement.exe") Sleep($i) Case @UserName = "User2" SplashTextOn("Active Processes", "office-User2", 200, 100, 0, 150, 4, "", 9) Sleep(1000) SplashOff() RunWait(@ScriptDir & "\office-User2\Config & Files Placement.exe") Sleep($i) Case @UserName = "User3" SplashTextOn("Active Processes", "office-User3", 200, 100, 0, 150, 4, "", 9) Sleep(1000) SplashOff() RunWait(@ScriptDir & "\office-User3\Config & Files Placement.exe") Sleep($i) Case @UserName = "User4" SplashTextOn("Active Processes", "office-User4", 200, 100, 0, 150, 4, "", 9) Sleep(1000) SplashOff() RunWait(@ScriptDir & "\office-User4\Config & Files Placement.exe") Sleep($i) Case Else; Do NothingEndSelect;Sleep($i); ----------------------------------------------------------------------------; Place functions here; ----------------------------------------------------------------------------Func MyExit() ExitEndFunc; ---------------------------------------------------------------------------- Link to comment Share on other sites More sharing options...
ricktendo Posted November 20, 2007 Share Posted November 20, 2007 (edited) RunOnceEx cannot do this... I use something similar with my Sidebar addonHKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}",,0,"Windows Sidebar"HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}","ComponentID",0,"sidebar.EXE"HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}","IsInstalled",0x00010001,01,00,00,00HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}","Locale",0,"US"HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}","StubPath",0x00020000,"RUNDLL32 advpack.dll,LaunchINFSection %INF_FILE%,Register"HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{D58F39FF-953E-4F45-898F-59F243B9A523}","Version",0,"6,0,6001,16659"You can probably use something similar, this stays in the registry (unlike ROEx) and each time a new user is created then this command is executedJust go to this location in the registry export and mod any key, you change the GUID and command (StubPath) and any other stuff you think necessaryHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components Edited November 20, 2007 by ricktendo64 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