mr-es335 Posted December 4, 2023 Posted December 4, 2023 (edited) Good day, I am in the process of converting a Nircmd script to AutoIt and I am wondering if anyone here has any knowledge or experience with Nirmcd - and in particular, with the "paramsfile" cmd. From what I have been able to glean, paramsfile would appear to be "an array". paramsfile [Parameters File] [Delimiters] [Quote Character] [NirCmd Command] This powerfull command allows you to execute NirCmd Command multiple times, by loading one or more parameters from a text file. The text file can be comma-delimited, tab-delimited, semicolon-delimited, or delimited by any char that you specify in [Delimiters] parameter. Here's an example... Let's say that you have the following text file, containing user names and passwords, delimited by comma: user01, 123456 user02, abcfg user03, 5fr23 user04, 33333 The following NirCmd commands sequence will create 4 users with the specified user-names and passwords (by using 'net user' command provided by Windows 2000/XP operating system) nircmd.exe paramsfile "c:\temp\users.txt" "," "" execmd net user ~$fparam.1$ ~$fparam.2$ /add The ~$fparam.1$ specifies the first entry in each line - the user name. The ~$fparam.2$ specifies the second entry in each line - the password. Examples: paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$ paramsfile "c:\temp\shortcuts.txt" "," "~q" shortcut ~$fparam.1$ "~$folder.desktop$" ~$fparam.2$ However, as I am endeavoring to get "a handle" or arrays, I thought that I might reach out to the folks here. Following is the section I am currently working on: @echo off & setlocal EnableDelayedExpansion :: ----------------------------------------------- set _spath=G:\Session_Master\Show set _dpath=G:\Session_Master\Show\Session_Data set _file1=wave_file_list.txt set _file2=Type_1.edl :: ----------------------------------------------- nircmd paramsfile "%_dpath%\%_file1%" "" "" shellcopy "%_dpath%\%_file2%" "%_spath%\~$fparam.1$.edl" yestoall :: ----------------------------------------------- exit wave_file_list.txt Type_1.edl Any assistance in this matter would be greatly appreciated! Thank you! Edited December 4, 2023 by mr-es335 mr-es335 Sentinel Music Studios
rudi Posted December 4, 2023 Posted December 4, 2023 Hello, have a look at fileopen, filereadline to take one line after another, stringsplit to separate the parameters and runwait to create your users. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
mr-es335 Posted December 8, 2023 Author Posted December 8, 2023 rudi, My apologies for my tardiness...thank you for the suggestions...and I have been looking it those... mr-es335 Sentinel Music Studios
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