Page 1 of 1 1
Topic Options
#121705 - 2004-06-23 10:47 AM gettype
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Dear all,

I am having difficulties with the above file. I basically need to get the output from the result and place it as a variable. The below script doesn't work

Code:
 

break on

$Smeg = ('Run "C:\Program Files\Resource Pro Kit\gettype.exe \\server"')

?"$Smeg"

Sleep 5



Can anyone help?

Thanks

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#121706 - 2004-06-23 11:07 AM Re: gettype
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah, run is a KiXtart command and thus cannot be assigned to a variable (in opposition to functions)

You may dismiss the braces () as well
_________________________



Top
#121707 - 2004-06-23 11:09 AM Re: gettype
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I'm not surprised it doesn't work.

You may get a better result with something like this:
Code:
Shell '"C:\Program Files\Resource Pro Kit\gettype.exe" \\server'
$iType=@ERROR
"Type="+$iType+@CRLF


Top
#121708 - 2004-06-23 11:10 AM Re: gettype
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Drat..

Do you know of a way i can get the reult as a variable?
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#121709 - 2004-06-23 11:18 AM Re: gettype
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Thanks Guys
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.084 seconds in which 0.064 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