Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/17/2019 in all areas

  1. TurionAltec

    Computer Set Up

    I can see why you're overwhelmed, that's a lot of tasks! I'm fairly experienced with AutoIT and it would take me a while to develop a script that can do all those tasks, specially sometime robust enough to work on many machines. And there may be more suitable tools, such as creating a master image and restoring with Sysprep that might be more applicable. Start by breaking each task down. Create a test script to tackle only one problem. Don't worry about the user interface, don't worry about the other tasks. Just use hard coded values in the script. When in development I like using "ConsoleWrite" to spit out some debug information while I go. When When looking at some of these system level changes, see if there's any programmatic API, registry, WMI, commandline tool that can do it. Trying to rely on pure GUI automation (mousemove, click, keystrokes, even controlclick) can be fragile. Your script is doing a lot of admin level stuff so it will need #RequireAdmin at the top. Admin username / password: Look at Commandline interface via Net: (net User, Net localgroup). These could be invoked via a Runwait() command. No need to use @COMSPEC because net.exe is separate from the command interpreter cmd.exe. Password hint may be more difficult Computer Name: Looks possible via wmic. Looks like you need to know existing name, doable via @ComputerName in AutoIt Sample wmic code, looking like it's written for batch, is: wmic computersystem where name="%COMPUTERNAME%" call rename name="NEW-NAME" Getting name from excel may be a little more involved, especially if Excel isn't installed on the PC. Look at IniRead, and FileRead/FileREadLine/FileReadToArray for potential options to read from a text file. To download something via http, check InetGet() Run programs using "Run" if you'll then need to interact with it, or "RunWait" if you want to wait for execution to finish. Pinning in Windows 7 at least it's just copying or deleting a shortcut into a certain file. Either per user, or one for global. Check our FileCopy() and FileDelete() Once you can get the individual features working, then look at starting to assemble them in one script.
    2 points
  2. Moved to the appropriate forum. Moderation Team
    1 point
  3. so cutting and pasting from SciTE acutally captures the coding from the screen. TY. ;THANK YOU VERY MUCH!!
    1 point
  4. I'd forgotten that one.
    1 point
  5. Or use #AutoIt3Wrapper_Res_SaveSource= ;(Y/N) Save a copy of the Script_source in the EXE resources. Default=N ; If _Res_SaveSource=Y the content of Script_source depends on the _Run_Au3Stripper and #Au3Stripper_parameters directives: ; If _Run_Au3Stripper=Y then ; If #Au3Stripper_parameters=/STRIPONLY then Script_source is stripped script & stripped includes ; If #Au3Stripper_parameters=/STRIPONLYINCLUDES then Script_source is original script & stripped includes ; With any other parameters, the SaveSource directive is ignored as obfuscation is intended to protect the source ; If _Run_Au3Stripper=N or is not set then ; Scriptsource is original script only ; AutoIt3Wrapper indicates the SaveSource action taken in the SciTE console during compilation ; See SciTE4AutoIt3 Helpfile for more detail on Au3Stripper parameters ;
    1 point
  6. Hey, nice player, one thing i think could be improved is the volume function. The mute function mutes the whole pc sound, instead of just the player, same for the volume adjust, it adjusts the global system volume instead of just the player volume.
    1 point
  7. See post below with regards to envset(), however you can use either EnvUpdate or WScript.Shell method: Or use WScript.Shell (I actually wrote this yesterday for a project I'm on, so has limited testing). ;~ $_iEnvType = 0 - Sets Enviroment Variable for all profiles ;~ $_iEnvType = 1 = Set Process Enviornment Variable ;~ $_iEnvType = 2 = Set System Enviornment Variable ;~ $_iEnvType = 3 = Set User Enviornment Variable ;~ $_iEnvType = 4 = Set Volatile Enviornment Variable Func _EnvVarSet($_sEnvVarName = "", $_sEnvVarValue = "", $_iEnvVarType = 3) Local $oEnvVarType, $aEnvVarType[5] = [4, "PROCESS", "SYSTEM", "USER", "VOLATILE"] Local $oWshShell = ObjCreate("WScript.Shell") Switch $_iEnvVarType Case 0 For $i = 1 To $aEnvVarType[0] $oEnvVarType = $oWshShell.Environment($aEnvVarType[$i]) $oEnvVarType($_sEnvVarName) = $_sEnvVarValue Next Case 1 To 4 $oEnvVarType = $oWshShell.Environment($aEnvVarType[$_iEnvVarType]) $oEnvVarType($_sEnvVarName) = $_sEnvVarValue Case Else Return SetError(1) EndSwitch EndFunc
    1 point
×
×
  • Create New...