nice_guy75 Posted April 23, 2010 Share Posted April 23, 2010 Hi guys,I have already wrote some scripts for registries and installation of some silent applications, but when I run those scripts I see a cmd window and I don't like that window so can I replace that cmd window with any image?If yes, then please tell me how and if possible, please give me the script itself. Link to comment Share on other sites More sharing options...
urie Posted April 23, 2010 Share Posted April 23, 2010 (edited) Hi guys,I have already wrote some scripts for registries and installation of some silent applications, but when I run those scripts I see a cmd window and I don't like that window so can I replace that cmd window with any image?If yes, then please tell me how and if possible, please give me the script itself. I suggest you try the Actual Autoit Forum Edited April 23, 2010 by urie Link to comment Share on other sites More sharing options...
Tripredacus Posted April 23, 2010 Share Posted April 23, 2010 I tried this once but found it easier to do it with Flash or an HTA. Link to comment Share on other sites More sharing options...
nice_guy75 Posted April 23, 2010 Author Share Posted April 23, 2010 I tried this once but found it easier to do it with Flash or an HTA.Can you please Explain in detail how I can do that with Flash or HTA????????????I am a newbie as far as Autoit or Flash or HTA is concerned. Link to comment Share on other sites More sharing options...
bj-kaiser Posted April 23, 2010 Share Posted April 23, 2010 Hi guys,I have already wrote some scripts for registries and installation of some silent applications, but when I run those scripts I see a cmd window and I don't like that window so can I replace that cmd window with any image?If yes, then please tell me how and if possible, please give me the script itself.http://www.autoitscript.com/autoit3/docs/functions/SplashImageOn.htm Link to comment Share on other sites More sharing options...
iamtheky Posted April 23, 2010 Share Posted April 23, 2010 if its static just splashimageon with @dektopwidth and @desktopheight set for x and y. Link to comment Share on other sites More sharing options...
nice_guy75 Posted April 24, 2010 Author Share Posted April 24, 2010 Thanks guys I have already wrote a script which displays an image on the screen, but can you please tell me any command which can stop that cmd window from appearing and how can I give command to this script so that it will disappear as soon as installation finishes.I know sleep (4000) means it will disappear in 4 secs similarly 40000 means 40 seconds but I wish it to disappear as soon as installation finishes, means I wish to associate this script with silent installer's script. Link to comment Share on other sites More sharing options...
iamtheky Posted April 24, 2010 Share Posted April 24, 2010 (edited) cmd /c = executes then terminates, so:blockinput (1)splashimageon ("" , ".....jpg", @desktopwidth , @desktopheight)runwait ("cmd /c .....exe") splashoff ()exitshould get you closer if I understand correctly Edited April 24, 2010 by iamtheky Link to comment Share on other sites More sharing options...
nice_guy75 Posted April 25, 2010 Author Share Posted April 25, 2010 @iamtheky Hey brother first of all thanks for your reply, but my problem is still not solved that window is still appearing. Link to comment Share on other sites More sharing options...
MrJinje Posted April 25, 2010 Share Posted April 25, 2010 Call your problematic batch from VBS like this, it should run the command without showing any cmd window. Run_Batch_Invisible.vbsCreateObject("Wscript.Shell").Run """" & ".\MyBatch.cmd" & """", 0, FalseCall that VBS from setupcomplete.cmd (or first login commands) using cscript with nologo switch.cscript.exe //nologo Run_Batch_Invisible.vbsAlso, without seeing your codes I have no way of knowing if it is a nesting issue or not. Even with this invisible tweak, nested scripts can still create a secondary or tertiary cmd window and we might need to do some minor re-writes to avoid that. Another simpler method might be CMDOW.exe, but that shows a CMD window for a fraction of a second. You are on your own with the image stuff, but hiding the window is actually very simple. Link to comment Share on other sites More sharing options...
nice_guy75 Posted April 25, 2010 Author Share Posted April 25, 2010 Thanks MrJinje,I have uploaded my au3 file, now you can study my scripts and suggest a solution if you would add those commands in the script itself and upload the modified script, I would be very grateful to you.ARC1.au3 Link to comment Share on other sites More sharing options...
MrJinje Posted April 25, 2010 Share Posted April 25, 2010 (edited) I would try creating a few copies of the VBS snippet and running them like this. One VBS per SFX. runwait("2.vbs")RunWait("4.vbs")RunWait("wrar39b5.vbs")And each of the VBS files will be slightly different. CreateObject("Wscript.Shell").Run """" & ".\2.exe" & """", 0, FalseCreateObject("Wscript.Shell").Run """" & ".\4.exe" & """", 0, FalseCreateObject("Wscript.Shell").Run """" & ".\wrar39b5.exe" & """", 0, FalseBut it's probably a better idea (considering 10 bad SFX files) that you try to repackage each of them so that they are invisible. Add the VBS file to your archive, and edit the VBS to run your internal batch file. Then set the SFX to call the VBS instead of the batch. This way the batch is invisible and you don't need to change your auto-it script. Edited April 25, 2010 by MrJinje Link to comment Share on other sites More sharing options...
iamtheky Posted April 25, 2010 Share Posted April 25, 2010 SplashImageOn("", "C:\Windows\Install\ARC.bmp" , @desktopwidth , @desktopheight)runwait("2.exe")RunWait("4.exe")RunWait("7-Zip-v9.13.exe")RunWait("AFP_silent.exe")RunWait("AR.exe")RunWait("file.sfx.exe")RunWait("Hidden.sfx.exe")RunWait("JRE6u20_silent.exe")RunWait("Micro.exe")RunWait("wrar39b5.exe")SplashOff ( )I also dont see where you open the command prompt so you may want to grab the control/name of the window that is hanging and close it manually prior to splash off.winactivate ("cmd.exe")winwaitactive ("cmd.exe)winclose ("cmd.exe") Link to comment Share on other sites More sharing options...
nice_guy75 Posted April 26, 2010 Author Share Posted April 26, 2010 That cmd window is opening when silent applications start installing, and ARC.bmp is also appearing but behind that image a cmd window is also opening. I would try to add your commands before SplashImageOn and would post the reply soon. Link to comment Share on other sites More sharing options...
MrJinje Posted April 26, 2010 Share Posted April 26, 2010 (edited) n/m Edited April 26, 2010 by MrJinje Link to comment Share on other sites More sharing options...
Recommended Posts