Jump to content

Maxaki

Members
  • Posts

    13
  • Joined

  • Last visited

Maxaki's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi This is the script, shouldn't it work to write to regedit? RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","REG_SZ",0) RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "0") /Andreas
  2. Because we have certain applications that needs to be installed on the user profile at the specific computer.
  3. Hi friends! I'm a little bit stuck in the automatic image installation at the company I'm working for. The script I'll have to create should basically be a script where the user(or me) can input their domain name and password which can be stored in a format where I then can execute it and enter it in the registry at first boot. Registry entries are: reg add "HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultUserName /t REG_SZ /d youruser (Changed by user input) reg add "HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultPassword /t REG_SZ /d yourpassword (Changed by user input) reg add "HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultDomainName /t REG_SZ /d yourdomain (Not changed) reg add "HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon" /v AutoAdminLogon /t REG_SZ /d 1 (Not changed) reg add "HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon" /v AutoLogonCount /t REG_DWORD /d 1 (Not changed) These should be stored temporary(Preferable on the local harddrive the image is installed on) and then when executed deleted. Is anyone familiar with these kind of scripts? Best Regards Andreas
  4. michaelslamet, It's difficult to explain but a friend helped me out, it seems like he solved it. Here is the code For $i = 1 To 60 If ProcessExists("example.exe") Then For $a = 1 to 59 If ProcessExists("example.exe") Then Sleep (10000) Else $i = 1 ExitLoop EndIf Next Else Sleep (10000) EndIf Next
  5. I realised that your script was just checking if the process were there every minute, if it wasn't it exists loop. It helped me make this though. For $i = 1 To 10 For $a = 1 To 9 If ProcessExists("AMPAgent.exe") Then Sleep(60000) Else Sleep(60000) EndIf ;Last try, now it will If ProcessExists("AMPAgent.exe") Then ExitLoop Next It tries 10 times and on the 10th time it will choose either to Exit the loop or to Continue it. The problem here is that I want to make the last If statement know if the other statement was "Then" or "Else" statements because then it can analyze if the program was open or not. This was a little bit more of challenge I guess...
  6. Water, Thank you!! Yes. This is what I needed. Awesome
  7. Hey. I am using HP Update Assistant to do some driver updates. I cannot interact with it and failed hard to make an ImageSearch. Anyway, between each driver it installs, a certain process launches. This happens about every 3-8minutes. I want it to check every minute for 10 minutes if the process exists. If it hasn't existed in 10 minutes I want it to do next command. Is this possible? With my small knowledge of scripting I think it should be something like: If loop 1 - 10 if not then next... etc /Andreas
  8. Not sure if helpful but have you tried this? ;Domain admin information Local $sUserName = "Account" Local $sPassword = "Password" $CMD= 'Your CMD command here' RunAs($sUsername, @ComputerName, $sPassword, 0,@ComSpec & " /c " & $CMD @SystemDir, @SW_Show)
  9. Melba23, Ok, I'll respond like this in the future. Thanks for helping me out. /Andreas
  10. If someone needs to automate the HP Update Assistant installation with updates and installation of drivers. Here is the code. ;Domain admin information Local $sUserName = "xxxx" Local $sDomain = "xxx" Local $sPassword = "xxx" ;Executes the HPUA with administrator rights $SupportAssistant = 'networkpath\HPDrivers\SupportAssistant\setup.exe /silent' RunAs($sUsername, $sDomain, $sPassword, 0,@ComSpec & " /c " & $SupportAssistant, @SystemDir, @SW_Show) ;Needs to be done to close the "finished installation" window, because AutoIT cannot interact with it. ProcessWait("msiinstaller.exe") ProcessWaitClose("msiinstaller.exe") Sleep(20000) ProcessClose("setup.exe") Sleep(3000) ;Execute the HPSF locally. 10Sec sleep because program has to load. ShellExecute(@ProgramFilesDir & "\Hewlett-Packard\HP Support Framework\HPSF.exe") Sleep("10000") ;Set Automatic update options For $a=1 To 28 send ("{TAB}") sleep (100) Next Send ("{DOWN}") Sleep("20") Send("{ENTER}") Sleep("20") For $b=1 To 4 send ("{TAB}") sleep (100) Next Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") For $c=1 To 3 send ("{TAB}") sleep (100) Next Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{ENTER}") Sleep("1000") ;Execute the HPSFUpdater to automatically update the HPSA client and HP Drivers. ShellExecute(@ProgramFilesDir & "\Hewlett-Packard\HP Support Framework\Resources\Updater\HPSFUpdater.exe")
  11. Seems to work, thanks a lot, now I can actually show the code to other people =) Yea that's true I'll use that, thank you.
  12. Okay, thnx! It's HP Update Assistant (To update drivers) which seems to have very bad interaction with AutoIT. I need HPUA on my automated image installation to do all the driver updates for HP on the specific computers. First of, it installs the software, goes thru the menu to select the auto update option and then restarts computer with autologon from unattend which will finally update all the HP drivers needed. I did a test with the window info tool to see if I could do any interaction to click a "Close" button but it would not work, even with [CLASS:name]. It doesn't seem to detect that the window exists. Using the Kace2000 to deploy my images and going to use this as a post install.
  13. Hey. Long time lurker here. This forum is really great, a lot of my noobscripting issues has been solved because of you friendly guys. Just now registered because I couldn't find any relevant thread about this issue. The script is as following, the main thing I want is as the Topic says: a delay loop instead of this awful piece of code. Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{DOWN}") Sleep("20") Send("{ENTER}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{TAB}") Sleep("20") Send("{SPACE}") Sleep("20") Send("{TAB}") Sleep("20") Send("{ENTER}") Sleep("1000") Appreciate all help I can get, take care!
×
×
  • Create New...