Jump to content
Sign in to follow this  

Trying to get my application to run

Recommended Posts


I have downloaded and started to use this nifty tool. What an awesome utility!!!!

I am trying to get an application to launch so I can have it run automatically. On the command line for the app, there is a variable that is entered to gather an environment variable and use this data. (It is a workstation naming utility)

Here is the script that I have so far:

Run("c:\windows\zmg\Zcnclite.exe /log:c:\windows\zmg\zcnc.log /remzen /sn: %WSOldName%")

WinWaitActive("ENGL Zcnc Lite 1.3 [build 1307]","Please enter new computer name.")


If I run the exact command from the command prompt or batch file, everything works properly.

When the application runs (successfully), it comes up with a window with the data of the environment variable WSOldName

When I run it with this script the window comes up with WSOldName for the data.

How do I get this to run?

Thanks in advance for any suggestions and help


Share this post

Link to post
Share on other sites

try this

Run('"c:\windows\zmg\Zcnclite.exe" /log:c:\windows\zmg\zcnc.log /remzen /sn: %WSOldName%')

Share this post

Link to post
Share on other sites

if WSOldName is an environment varible and you want to used %WSOldName% then you will need this line at the beginging of your script Opt("ExpandVarStrings", 1) ;0=don't expand, 1=do expand this option allows you to use %environment% variables inside strings. or you can use this other line:

Run("c:\windows\zmg\Zcnclite.exe /log:c:\windows\zmg\zcnc.log /remzen /sn: " & EnvGet("WSOldName"))

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.