QUOTE (Mekrel @ Sep 26 2005, 08:20 AM)
Im real liking your master script idea, sounds very clever and easy to customise as when you change one of the children scripts, then the master script doesnt have to be changed to execute it

Thanks, it is easy. Just add the installer and Au3 script to the Software folder and it is done. No list to update.
QUOTE (Mekrel @ Sep 26 2005, 08:20 AM)
I want to convert all of my CMD scripts into au3 scripts so they dont popup (cmdown.exe still pops up a window and other wrappers that try to hide the console fail).
Identify Installer in CMenu is recommended. It is quick.
If you want to do the same as my method then:
Add the master script in root $OEM$ named _Deployment.au3.
Create a folder in root of $OEM$ named Software.
Add installers and CMenu scripts in $OEM$\Software
I use the Winntbbu.dll picture added to $OEM$ root.
Create Au3 files named _Prepare.au3, _Cleanup.au3 and _Startup.au3.
Add AutoIt3.exe from latest Beta to $OEM$ root.
Add Regtweaks.reg to $OEM$ root.
Create Cmdline.txt and add this inside it:
CODE
[COMMANDS]
"AutoIt3.exe _Deployment.au3"
"RegEdit /s RegTweaks.reg"
Done. This runs from Cmdlines.txt. A small script can make it run from RunOnceEx instead.
QUOTE (Mekrel @ Sep 26 2005, 08:20 AM)
I did have a plan, which was to write the commands to be ran as uaul but to store them in a text file, and then for a au3 script to read it and pass each line into a Run function which called
@Comspec & "/c" & "command here"
but command here was obviously a variable which was read from each line and obviously done with a loop untill the end of the file was reached, but unfortunatly this spawned alot of windows as each time the run function was called = another instance of cmd.exe being made.
So I thought I would use _RunDos but I kept getting some kind of error.
Any ideas on to make a au3 script which will cleanly and silently run a cmd script?
A text file of commands is a harder method to setup and maintain. Here are some silent samples but instead of using Run, you will need to use RunWait instead.
CODE
$cmdfile = 'test.cmd'
; Sample 1
RunWait($cmdfile, '', @SW_HIDE)
; Sample 2
RunWait(@ComSpec & ' /c Call "' & $cmdfile & '"', '', @SW_HIDE)
This would spawn lots of hidden cmd windows, but not all at once.
If you are handy enough with AutoIt, then you should not need a single cmd script in your whole project. Cmd windows are not a problem when using solely AutoIt.