Page 1 of 2 12>
Topic Options
#188664 - 08/07/10 05:06 PM Simply can't seem to get a RUN command to work.
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
I purchased EZAudit software to get a weekly audit of PC's and software titles for compliance, and their user's guide says to enter this command in my KiXtart login script:

RUN "\\your_server_name\ezaudit\ezstart.exe /auto"

When I put that in, nothing happens. When run from a RUN command on an individual PC, the command is "\\server_name\ezaudit\ezstart.exe" /auto, and that works fine. If I try to enter it as above in the login script, the login fails with an error. Finally, when I try to encase the above command in single quotes, ('"\\server_name\ezaudit\ezstart.exe" /auto') nothing happens.

Any ideas?

Top
#188665 - 08/07/10 05:16 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Kdyer Offline
KiX Supporter
*****

Registered: 01/01/03
Posts: 6241
Loc: Tigard, OR
Welcome,

What is "an error"? You need to tell us what "an error" is. It is like saying my car has a problem.. What is "a problem"? \:\)

What you can do is the following:

Do your users have the ability to access \\your_server_name\ezaudit if they run it from a command-line?

You need to make sure they have have execute permissions to that share called "ezaudit"..

If you are able to get there, then you may need to throw a couple of macros in your script like @ERROR and @SERROR to have it pipe back what the problem is.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188667 - 08/07/10 05:47 PM Re: Simply can't seem to get a RUN command to work. [Re: Kdyer]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
Pop-up Box

KiXtart
ERROR: Error in expression.!
Script: C:\WINNT\System32\yupo.kix
Line: 98

That's what happens when the command entered in the script looks exactly like this: Run "\\yuponas\ezaudit\ezstart.exe" /auto

Yes, all users can run the command from their own PC's and have explicit modify etc. permission to the folders.

Top
#188668 - 08/07/10 05:49 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4261
Loc: USA
Try putting /auto inside the quotes.
Top
#188669 - 08/07/10 06:08 PM Re: Simply can't seem to get a RUN command to work. [Re: Allen]
Les Offline
KiX Master
*****

Registered: 01/06/11
Posts: 12734
Loc: fortfrances.on.ca
Looks like he tried that.
 Quote:
Finally, when I try to encase the above command in single quotes, ('"\\server_name\ezaudit\ezstart.exe" /auto') nothing happens.


Try including COMSPEC or pushing the command to the RunOnce reg key instead.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#188671 - 08/07/10 06:18 PM Re: Simply can't seem to get a RUN command to work. [Re: Les]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
I've tried the COMSPEC shell routine and that fails (sorry, don't remember the message and probably won't retry it), and I've tried creating it as a CMD and running the CMD, all to no avail. Clueless on the "pushing the command to the RunOnce reg key instead" comment. The command works in quotes without the /auto, but then requests them to save the file on their own PC, which really does me no good.

I undestand that this is probably a failure on the EZAudit side, but I was hoping someone could tell me why

Run '"\\yuponas\ezaudit\ezstart.exe" /auto'

isn't a valid command in KiXtart, or how to turn

run "\\yuponas\ezaudit\ezstart.exe" /auto

into a command that will run through KiXtart.

Top
#188673 - 08/07/10 07:07 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4261
Loc: USA
I don't know what you tried, but it seems like this should work
run '%comspec% /c "\\yuponas\ezaudit\ezstart.exe" /auto'

Top
#188676 - 08/07/10 08:05 PM Re: Simply can't seem to get a RUN command to work. [Re: Allen]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
Thanks for your assistance all. After adding the compspec part, I get a message when the script runs telling me the command ran, but it still doesn't run the actual program. Strange stuff. I'll just continue walking to the PC's I guess.
Top
#188677 - 08/07/10 08:13 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Kdyer Offline
KiX Supporter
*****

Registered: 01/01/03
Posts: 6241
Loc: Tigard, OR
Did you try the options?
 Code:
run '%comspec% /c "\\yuponas\ezaudit\ezstart.exe" /auto' 
?@ERROR
?@SERROR

Or..
 Code:
SHELL '%comspec% /c "\\yuponas\ezaudit\ezstart.exe" /auto' 
?@ERROR
?@SERROR

Or..
 Code:
SHELL '%comspec% /c \\yuponas\ezaudit\ezstart.exe /auto' 
?@ERROR
?@SERROR

Or..
 Code:
RUN '%comspec% /c \\yuponas\ezaudit\ezstart.exe /auto' 
?@ERROR
?@SERROR

Or..
 Code:
RUN '%comspec% /c /e:on \\yuponas\ezaudit\ezstart.exe /auto' 
?@ERROR
?@SERROR

Or..
 Code:
$EXEPATH="\\yuponas\ezaudit\ezstart.exe"
RUN '%comspec% /c '++' /auto' 
?@ERROR
?@SERROR


HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188678 - 08/07/10 09:45 PM Re: Simply can't seem to get a RUN command to work. [Re: Kdyer]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
run '%comspec% /c "\\yuponas\ezaudit\ezstart.exe" /auto'
No error messages, no audit.

SHELL '%comspec% /c "\\yuponas\ezaudit\ezstart.exe" /auto'
CMD.EXE was started as the above path in current directory, UNC not supported

SHELL '%comspec% /c \\yuponas\ezaudit\ezstart.exe /auto'
Same as above

RUN '%comspec% /c \\yuponas\ezaudit\ezstart.exe /auto'
No error, no audit.

RUN '%comspec% /c /e:on \\yuponas\ezaudit\ezstart.exe /auto'
No error, no audit.\

$EXEPATH="\\yuponas\ezaudit\ezstart.exe"
RUN '%comspec% /c '++' /auto'
Flashed by too fast to see, but there was some type of memory error.

Top
#188681 - 08/07/10 10:46 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Kdyer Offline
KiX Supporter
*****

Registered: 01/01/03
Posts: 6241
Loc: Tigard, OR
Rick,

Went to: http://www.ezaudit.com/guide/lanwan.htm

Note: The information of how to run this application using START.

Under the KiXtart Section, they say to do:
 Quote:

KixTart
RUN "\\your_server_name\ezaudit\ezstart.exe /auto"

In some environments, the syntax may have to include the %comspec% command:

Shell “%comspec% /c start \\your_server_name\ezaudit\ezstart.exe /auto”
Note that ezstart.exe takes under 5 seconds to launch and terminate, so either is appropriate and won't hang up your logon script.


So..
 Code:
RUN "\\yuponas\ezaudit\ezstart.exe /auto"


Or..
 Code:
Shell "%comspec% /c start \\yuponas\ezaudit\ezstart.exe /auto"


If you want to see what is going on..
 Code:
Shell "%comspec% /c start \\yuponas\ezaudit\ezstart.exe /auto"
?@ERROR
?@SERROR
Get $
?'Press a key to continue'



Thanks,

Kent


Edited by Kdyer (08/07/10 10:47 PM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188684 - 08/07/10 11:12 PM Re: Simply can't seem to get a RUN command to work. [Re: Kdyer]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 03/01/28
Posts: 4211
Loc: New Jersey
Shell requires a single string argument. Many of the examples you posted define multiple arguments. Please try the following, which is a strongly recommended method for using Shell/Run:
 Code:
$Cmd = '%COMSPEC% /c'
$Cmd = $Cmd + ' "\\yuponas\ezaudit\ezstart.exe" /auto'
$Cmd = $Cmd + ' >c:\temp\result.log 2>c:\temp\error.log'
'About to run ' $Cmd ?
Shell $Cmd

  • The double quotes in line 2 are not required unless there are spaces in your command path - having them there will not hurt.
  • The redirects in line 3 should be adjusted to reference a writable location on the client system. Any output and errors from the EZStart.exe will be written to the logs, so you don't have to be an Evelyn Wood graduate. ;\)
  • Line 4 displays the command before it is run - this can later be commented out, but it gives you a chance during development to verify that the command was constructed properly.
  • Shell can be replaced with Run without consequence, as long as you understand the difference in execution method. You will NOT be able to get entirely accurate results with the ERROR macros with Run, as they will only report a failure to locate or start the defined command. They will not report the result of its execution.
  • Note the use of leading spaces as the cmd string is built!

Glenn
_________________________

Actually I am a Rocket Scientist! \:D

Top
#188705 - 08/07/11 02:41 PM Re: Simply can't seem to get a RUN command to work. [Re: Glenn Barnas]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
First to Kent. I have tried those two forms, with the first one being copied directly from their site, with modification to your_server_name, of course, with no luck. And on my system, SHELL in the logon script always causes an error.

To Glenn, I did something very similar to what you show. I found it in one of the forums (fori, fora?) but I don't think I tried the comspec peice, just created the CMD to be '"\\yuponas\ezaudit\ezstart.exe" /auto' and ran the command. The message "about to run \\yuponas\...." shows up fine, but again, the actual program never runs.

Some explanation of the environment: the logon script runs on our domain controller, and just before the attempt to run ezaudit, the script adds yuponas as a mapped drive. The messages saying yuponas has been added always show up. The next command is the run.

Question about the KiXtart script: could the issue be about where the two objects reside? I am assuming that the script basically runs locally on the PC that's logging on, which has access to yuponas by the time the run command is supposed to be executed. Nothing in the ezaudit literature says I have to have any executable on the PC's themselves. Just kind of rambling here, but ezaudit folks say they've got 10,000 users and have very few calls to their support desk, so I'm missing something here.

Top
#188708 - 08/07/11 07:49 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 03/01/28
Posts: 4211
Loc: New Jersey
The comspec is required in order to redirect the output of the command to the log files. Did you try that? did anything show up in the log files that might lend additional clues? If you're redirecting to log files, you won't see any output on the screen. Also, since this is a login process, I'd try Shell instead of Run, so it's synchronous. I've not used Run in the login script for anything that takes more than a second or two to execute, so I'm not sure of any consequence on the children when the parent process exits. I assume your executable taks a bit of time to run.

Another diagnostic step - Create a batch file in the same folder. The batch file should just write the time to a log file (time /t > .\startlog.txt). Execute the batch file just before you execute your installer. That will validate that the drive is mapped and you can execute objects on that share.

If you're mapping a drive to the executable location, why are you using UNC syntax to specify the command path? If you
net use x: \\server\share
your command line should be something like
x:\ezaudit\exstart.exe

Hmm... "ezstart"??? \:o Don't seem to be this time! ;\)

Last thing - please try my example exactly as shown. Only modify paths to suit your environment. If it fails, post the logs that it generates.

Glenn



Edited by Glenn Barnas (08/07/11 07:51 PM)
_________________________

Actually I am a Rocket Scientist! \:D

Top
#188710 - 08/07/11 09:03 PM Re: Simply can't seem to get a RUN command to work. [Re: Glenn Barnas]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
Glenn:

Basically the same result. Using the SHELL causes the error listed previously about CMD.exe executed, UNC not supported. The error and result log files were created, but empty. I'll try to execute it from the mapped drive vs. the UNC.

Top
#188711 - 08/07/11 09:31 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
Rick_Folsom Offline
Fresh Scripter

Registered: 08/04/01
Posts: 8
Used the command y:\ezaudit\ezstart.exe annd the error log said path not found.

I'd like to find someone that uses ez-audit and KiXtart and see what they do, because this just isn't worth the struggle.

Top
#188712 - 08/07/11 10:12 PM Re: Simply can't seem to get a RUN command to work. [Re: Rick_Folsom]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11547
Loc: CA
Well would like to help but after reading this
 Quote:
Prices start at just USD $149.95

, not sure we can do much else for you except trial and error. I have been using KiXtart now for over 6 years and in that time I've seen thousands of posts and I can only recall maybe 1 or 2 applications that would not run from a shell of KiXtart.
Those though would not run from a DOS batch file either. The point being that there must be something maybe being overlooked or not written correctly.

Glenn is VERY good at coding and debugging so please follow his examples and also put in debugging statements to see the exact error messages and track it down.

Top
#188714 - 08/07/11 11:52 PM Re: Simply can't seem to get a RUN command to work. [Re: NTDOC]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 03/01/28
Posts: 4211
Loc: New Jersey
The error message is very helpful, actually.

When you say "Y:\folder\file.exe", you tell the O/S to run "file.exe", which is found in the path "Y:\folder". Just because you tell the O/S where the file that you want to run is , it doesn't mean it will go there and then run the file, it just means it will run that file while sitting right where it is (in it's favorite easy chai - um - folder.

The message is most likely coming from the installer, not the OS. So - get a little more complex - Create a batch file to run the installer - EasyStart.BAT. It should look something like
 Code:
@Echo Off
Y:
CD \EasyAudit
.\EasyStart.exe (plus any needed args) >C:/temp/install.log 2>C:\Temp\error.log

This assumes that you mapped the drive to Y: in Kix before running this command via
Shell "Y:\EasyAudit\EasyStart.bat"

If that works, you can think about doing these commands in Kix if you wish, but using the bat file will let you test outside of kix. That's important when debugging and you're not sure if the problem is Kix, the environment, or the application you're launching.

I had an issue this past Tuesday where an install failed because there was a space in the path defined by %TEMP%. Spent a while looking at my Kix script before I started running the commands manually. Really tough, because no error wass generated, the process just exited silently. Basically, it pays to break your logic into managable chunks, even outside of your core process.

Glenn
_________________________

Actually I am a Rocket Scientist! \:D

Top
#188716 - 08/07/12 12:33 AM Re: Simply can't seem to get a RUN command to work. [Re: Glenn Barnas]
Les Offline
KiX Master
*****

Registered: 01/06/11
Posts: 12734
Loc: fortfrances.on.ca
Why not try the RunOnce key?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#188723 - 08/07/13 01:42 PM Re: Simply can't seem to get a RUN command to work. [Re: Les]
Arend_ Moderator Offline
MM club member
*****

Registered: 05/01/17
Posts: 1819
Loc: Hilversum, The Netherlands
How About:
 Code:
$objShell = CreateObject("WScript.Shell")
$objShell.Run("\\yuponas\ezaudit\ezstart.exe /auto")

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (green78) and 144 anonymous users online.
Newest Members
Keris2112, Jorromans, qrstuv140696, Bloodboy, NIJAKIX
17451 Registered Users

Generated in 0.097 seconds in which 0.032 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org