Jump to content

Recommended Posts

Posted

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.


Posted (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 by urie
Posted

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.

Posted

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.

Posted (edited)

cmd /c = executes then terminates, so:

blockinput (1)

splashimageon ("" , ".....jpg", @desktopwidth , @desktopheight)

runwait ("cmd /c .....exe")

splashoff ()

exit

should get you closer if I understand correctly

Edited by iamtheky
Posted

Call your problematic batch from VBS like this, it should run the command without showing any cmd window.

Run_Batch_Invisible.vbs

CreateObject("Wscript.Shell").Run """" & ".\MyBatch.cmd" & """", 0, False

Call that VBS from setupcomplete.cmd (or first login commands) using cscript with nologo switch.

cscript.exe //nologo Run_Batch_Invisible.vbs

Also, 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.

Posted

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

Posted (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, False

CreateObject("Wscript.Shell").Run """" & ".\4.exe" & """", 0, False

CreateObject("Wscript.Shell").Run """" & ".\wrar39b5.exe" & """", 0, False

But 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 by MrJinje
Posted

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")

Posted

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.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...