Page 1 of 1 1
Topic Options
#116824 - 2004-03-25 02:20 PM SHELL doesn't complete when running csccmd.exe
morphus Offline
Fresh Scripter

Registered: 2004-03-25
Posts: 20
I would like to know if anybody ever use csccmd using a SHELL command succesfully?

I'm trying to use csccmd to execute a moveshare, and when execute through kix with SHELL, it only does half of the entry. If I execute it directly on a cmd window, it work with perfectly.

I've try usign cmd /c cmd /k start /w /b nothing seem to help...

Any suggestion is appreciated

Thank

Michel Lapointe

Top
#116825 - 2004-03-25 02:22 PM Re: SHELL doesn't complete when running csccmd.exe
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Lets see your line of code ...
Top
#116826 - 2004-03-25 02:53 PM Re: SHELL doesn't complete when running csccmd.exe
morphus Offline
Fresh Scripter

Registered: 2004-03-25
Posts: 20
Here it is...

You can replace RUN/SHELL and append cmd /c cmd /k or start /w /b and it all give the same result

RUN "cmd /c " + Chr(34) + "\\s-netstorage\OfflineMigrationLog$\Tools\csccmd.exe /moveshare:\\" + $OLDSERVERNAME + "\" + $SHARENAME +"\" + @USERID + " \\" + $NEWSERVERNAME + "\" + $SHARENAME + "\" + @USERID + Chr(34)


Thank

Top
#116827 - 2004-03-25 03:08 PM Re: SHELL doesn't complete when running csccmd.exe
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
I think you have a Quotes problem here (not tested though), try to wrap the entire thing you want to run/shell in single quotes and use double quotes inside
_________________________



Top
#116828 - 2004-03-25 03:12 PM Re: SHELL doesn't complete when running csccmd.exe
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Maybe try this:
Code:
Shell 'cmd /c "\\s-netstorage\OfflineMigrationLog$$\Tools\csccmd.exe"'
+' /moveshare:"\\' + $OLDSERVERNAME + '\' + $SHARENAME +'\' + @USERID +'"'
+' "\\' + $NEWSERVERNAME + '\' + $SHARENAME + '\' + @USERID + '"'


Top
#116829 - 2004-03-25 03:13 PM Re: SHELL doesn't complete when running csccmd.exe
morphus Offline
Fresh Scripter

Registered: 2004-03-25
Posts: 20
I've fix the Quote issue, which make command line simpler to write, but still have the same problem... The command execute (since it does half of the job) but seem to be stop by Kix...

Thank

ML

Top
#116830 - 2004-03-25 03:30 PM Re: SHELL doesn't complete when running csccmd.exe
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Put the command string in to a variable and print it to the screen before sending it to SHELL. And make it a habit to use %COMSPEC% instead of cmd.exe.
_________________________
There are two types of vessels, submarines and targets.

Top
#116831 - 2004-03-25 04:30 PM Re: SHELL doesn't complete when running csccmd.exe
morphus Offline
Fresh Scripter

Registered: 2004-03-25
Posts: 20
I've try it... here is the code... and it still only does half of the job...

Dim $EXEC
$EXEC = '%COMSPEC% /c "\\s-netstorage\OfflineMigrationLog$\Tools\csccmd.exe /moveshare:\\' + $OLDSERVERNAME + '\' + $SHARENAME + '\' + @USERID + ' \\' + $NEWSERVERNAME + '\' + $SHARENAME + '\' + @USERID + '"'
? $EXEC ?
Shell $EXEC
?
? @ERROR + " | " + @SERROR ?

BTW sorry if the post appear twice, but since my last login the 3 last post as dissapear???

ML

Top
#116832 - 2004-03-25 04:41 PM Re: SHELL doesn't complete when running csccmd.exe
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Posts just don't disappear here. You've posted the other ones into an incorrect thread. See http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=115508 for your missing posts.
_________________________
There are two types of vessels, submarines and targets.

Top
#116833 - 2004-03-25 04:42 PM Re: SHELL doesn't complete when running csccmd.exe
morphus Offline
Fresh Scripter

Registered: 2004-03-25
Posts: 20
Sorry for that mistake ...

ML

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.062 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

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