/build/static/layout/Breadcrumb_cap_w.png

Hide Command Window while Running Online Batch Script with K1000?

Is it possible to hide the cmd.exe window while running an online shell script?


0 Comments   [ + ] Show comments

Answers (8)

Answer Summary:
Posted by: angrymidget 10 years ago
White Belt
4

One of the easiest ways to do this is to use the "View the raw XML editor" and change the type= setting from policy to hidden.

<config name="Blah blah script for whatever" type="hidden" id="150" version="1393522756" description="Blah blah blah">

When you do this, the script runs in an entirely silent mode with no windows being shown to the end user.


Comments:
  • Worked for my powershell script running on our 700 Windows 7 workstations. Thanks. - davidgrand 10 years ago
  • I have been trying to find this information for almost a year now. Thank you so much! - Jhogue 9 years ago
Posted by: WGM_Jeff 12 years ago
4th Degree Black Belt
2

I was just running into the same issue. Someone poined me to this tool. It is a batch to exe converter, and it is working for me. You can set it to run invisible when you create the exe.

http://www.f2ko.de/programs.php?lang=en&pid=b2e


Comments:
  • But you will have to run it as an Online Kscript or Ofline Kscript and choose launch a program. - WGM_Jeff 12 years ago
    • I relied heavily on this tool for years, but more and more Anti-malware and AV tools are killing it. Too much hassle. - kelleyplumos 8 years ago
Posted by: bparme 12 years ago
Orange Belt
1

Does the cmd.exe window show your batch script or is it just a blank window? I had a similar issue with batch files inside of managed installs showing a blank command prompt window the entire time the install was running. It turned out to be a bug. To get around it I used iexpress to wrap the batch file in an exe and run it that way. Or I believe you can also call the batch file silently through a VB script.


Comments:
  • 2nd that on the VB script. - Aaron Cool 12 years ago
  • It's is a blank window. I will check out the VB script call.

    Yeah, this blank cmd window sits there... which doesn't work out if a user is active on the machine. - muebel 12 years ago
  • VS script is the easiest route I agree. it simple calls the exe inside an invisible window. I swear I answered this question yesterday. - RandomITPro 12 years ago
    • yeah, actually searching now I can see this is a very common question. my bad! - muebel 12 years ago
  • Is this a bug within the K1000?
    If it's something that is likely to be fixed in a future update I can live with it.

    It is only happening on our Windows 7 machines and we don't have too many of them yet. - Arcolite 12 years ago
Posted by: jaredv 12 years ago
Fourth Degree Green Belt
1

I do not believe you can change any aspect of how an Online Shell Script is executed.

I would recommend using an "Offline KScript" or "Online KScript" and launching the script via Wscript.exe instead, with the following syntax:

Launch $(KACE_SYS_DIR)\wscript.exe” with params “//B //nologo scriptname.sh"

Comments:
  • I don't seem to have the option of "Offline Shell Script". The only Shell Script option we have is "Online". - tdickert 12 years ago
  • Sorry, that should've been 'Offline KScript' with that command. I've fixed the original comment. - jaredv 12 years ago
Posted by: merklo 12 years ago
Senior White Belt
1

To help others wasting time trying to resolve this: it will not happen without an agent update.

This is a known bug (AGENT-2026) and I have encountered it as early as November 2011. For whatever reason the bugfix did not make it in the most recent agent releases and from what I have been told several times now it will not be fixed until 5.4 comes out.

This is a major problem to my org: we deploy over 150 titles to ~5000 Windows stations used by 15000 students and staff on a daily basis. Telling a 4th grader not to close the command window is like waving a red flag in front of a bull; our desktop guys are having to uninstall and reinstall apps by hand dozens of times every day (and that's just those that call and complain).

So if this is causing you as much grief, please call support and scream and holler. Maybe the bugfix timeline will move up. Or do what I am about to do: spend a couple of hundred hours recreating and testing your managed installs as KBOX scripts or go back to what you were using before you paid for the KBOX.

 

Posted by: snissen 12 years ago
Fourth Degree Green Belt
0

And here's the utility I like: Hidden Start at http://www.ntwind.com/software/hstart.html .

Not only can it hide the window, it can also delay and can handle UAC prompts.

Posted by: piyushnasa 12 years ago
Red Belt
0

You can try Cmd.exe /c

Apart from that I do not think it is possible to hide it.


Comments:
  • Even so, could you post an example script using that wscript.exe? - tdickert 12 years ago
Posted by: Aaron Cool 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ