Sign in to follow this  
Followers 0
cowsmanaut

issue with comspec

5 posts in this topic

run ( @comspec & "c:\au3_tool\psexec \\digi"& $digi &" -i c:\au3_test\caphost.exe")

I run this and I have the Digi value defined.. I already have a file copy command that uses this same set up and works..

FileCopy("C:\au3_tool\command.ini", "\\digi" & $digi & "\c$\au3_test\*.*")

however when I try to run the psexec it tells me the file does not exist...

Am I missing something??

Share this post


Link to post
Share on other sites



What's in your variable.

try

RunWait(@ComSpec & " /c " & 'c:\au3_tool\psexec \\digi" & $digi &" -i c:\au3_test\caphost.exe', "")

CheersNobby

Share this post


Link to post
Share on other sites

the variable is the number of the computer. we have a network with comeputer names that range from digi01-digi21

so the variable contains 01-21

moo

Share this post


Link to post
Share on other sites

add the exteension to your program (.exe or .bat etc)

to test script use a " /k " instead of " /c "

sample:

Runwait ( @ComSpec & " /k " & '"C:\Program Files\ParseRat\parserat.exe "')

notice the use of '"'" ( single quotes around double quotes because of the spaces in the folder name)

if you are running a windows program you dont need @comspect and some dos programs run fine without it

Share this post


Link to post
Share on other sites

run ( @comspec & "c:\au3_tool\psexec \\digi"& $digi &" -i c:\au3_test\caphost.exe")

I run this and I have the Digi value defined.. I already have a file copy command that uses this same set up and works..

FileCopy("C:\au3_tool\command.ini", "\\digi" & $digi & "\c$\au3_test\*.*")

however when I try to run the psexec it tells me the file does not exist...

Am I missing something??

<{POST_SNAPBACK}>

Either use:

run("c:\au3_tool\psexec.exe \\digi" & $digi & " -i c:\au3_test\caphost.exe")

or:

run(@comspec & " /c c:\au3_tool\psexec.exe \\digi" & $digi & " -i c:\au3_test\caphost.exe")

Should both work.

Greetings, ZeD

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  
Followers 0