want to avoid a dialog box when running a script

Posted on 2008-11-18
Last Modified: 2012-05-05
I have created a batch file (.cmd) that adds a few  registry parameters to the users profile and then launch the application. then published the file in citrix. when the user is launching this file, there is a dialog box asking the user to select either


when he clicks on run, it works fine. i dont want this dialog box to appear. is there a switch that i need to add to supress this dialog box and directly run the batch file
Question by:mgmohiuddin
    LVL 31

    Expert Comment

    The dialog box is a security measure put in place since .CMD files are often used for malicious purposes. It also is shown for files that have been freshly downloaded from the internet.

    There should be a checkbox on that dialog box that says "Always ask before opening this file" or something on that order that you can uncheck to suppress the dialogue box.
    LVL 31

    Expert Comment

    Alternatively, try running CMD.EXE with command line parameters pointing to your batch file.

       cmd.exe /c "C:\somefolder\somescript.cmd"

    This will launch CMD.EXE which should be trusted.

    Author Comment

    i did that but the the application is not starting and giving an error
    LVL 8

    Expert Comment

    Where is the batch file located?  Sounds like maybe it is in a network location?  If so, can it be stored on the C drive of the Citrix server to see if the warning message goes away?
    LVL 8

    Accepted Solution

    (and can every executable referred to in the batch file also be located on the C drive?)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now