Click here to Skip to main content
15,906,106 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Arguments "%1" and other... Not urgent :) Pin
Joshua Quick29-Mar-06 15:03
Joshua Quick29-Mar-06 15:03 
GeneralRe: Arguments "%1" and other... Not urgent :) Pin
FeRtoll29-Mar-06 22:44
FeRtoll29-Mar-06 22:44 
GeneralRe: Arguments "%1" and other... Not urgent :) Pin
Steve Pullan30-Mar-06 11:53
Steve Pullan30-Mar-06 11:53 
GeneralRe: Arguments "%1" and other... Not urgent :) Pin
FeRtoll29-Mar-06 22:53
FeRtoll29-Mar-06 22:53 
GeneralRe: Arguments "%1" and other... Not urgent :) Pin
J4amieC29-Mar-06 23:02
J4amieC29-Mar-06 23:02 
AnswerRe: Arguments "%1" and other... Not urgent :) Pin
Joshua Quick30-Mar-06 11:26
Joshua Quick30-Mar-06 11:26 
GeneralRe: Arguments "%1" and other... Not urgent :) Pin
FeRtoll7-Feb-07 9:44
FeRtoll7-Feb-07 9:44 
QuestionVBS, piping out the results to text Pin
aste629-Mar-06 8:02
aste629-Mar-06 8:02 
Confused | :confused: Hey guys! I am a rookie having a problem and need your help. I am trying to run the SMS ClientAction script below on a list of targeted machines (using a .TXT file) but I can't get it to execute the .VBS on the targeted machines,instead the .VBS is only executing and pulling back results of the local machine the number of times it see's a targeted machine.

For example if I have 5 machines targeted, it will pull back the results of the local machine 5 times. I am trying to have the results show the Machine Name and the Count. I have the .vbs & .bat. listed below. I'd appreciate any help you can give.

=========.vbs file=========
dim oCPAppletMgr 'Control Applet manager object
dim oClientAction ' Individual client action
dim oClientActions ' A collection of client actions
dim iCount 'Number of actions


'Get the Control Panel applet manager object
set oCPAppletMgr=CreateObject("CPApplet.CPAppletMgr")
if err.number<>0 then
Wscript.echo "Couldn't create control panel application manager"
Logging(FSO)
end if


'Get a collection of actions
set oClientActions=oCPAppletMgr.GetClientActions
if err.number<>0 then
wscript.echo "Couldn't get the client actions"
set oCPAppletMgr=nothing
end if

wscript.echo oClientActions.Count

'Display each client action
For iCount = 1 to oClientActions.Count
set oClientAction=oClientActions.Item(iCount)

next

set oClientActions=nothing
set oCPAppletMgr=nothing


=========batch file==========
set log=Log.csv
if /i exist oldlog.csv del oldlog.csv
if /i exist "%log%" ren "%Log%" oldlog.csv

echo Machine,Object,Count > %log%

for /f "tokens=1" %%i in (Machine.txt) do call :checker %%i

:Checker

Set Machine=%1

Set Count=

cscript action.vbs %1 >Temp.txt

For /F "skip=1 Tokens=1" %%i in (temp.txt) Do Set Count=%%i

FIND /I "Unable to access" TEMP.TXT > NUL

IF NOT ERRORLEVEL 1 SET Status=Unable to Access

:LOGGING
echo %machine%,%count%,%object% >>%log%

goto :EOF
QuestionCombo Box Pin
rahsi29-Mar-06 7:17
rahsi29-Mar-06 7:17 
AnswerRe: Combo Box Pin
Steve Pullan29-Mar-06 12:58
Steve Pullan29-Mar-06 12:58 
GeneralRe: Combo Box Pin
rahsi30-Mar-06 4:54
rahsi30-Mar-06 4:54 
QuestionCounters and boolean Pin
judamu29-Mar-06 7:15
judamu29-Mar-06 7:15 
AnswerRe: Counters and boolean Pin
Steve Pullan29-Mar-06 12:52
Steve Pullan29-Mar-06 12:52 
QuestionHow can I change the color of a Checkbox in a Treeview ? Pin
trlowe29-Mar-06 6:43
trlowe29-Mar-06 6:43 
AnswerRe: How can I change the color of a Checkbox in a Treeview ? Pin
atregent12-Apr-06 20:43
atregent12-Apr-06 20:43 
QuestionHow to make Vb6 forms resolution independent Pin
Murtuza Husain Miyan Patel29-Mar-06 6:30
professionalMurtuza Husain Miyan Patel29-Mar-06 6:30 
AnswerRe: How to make Vb6 forms resolution independent Pin
Joshua Quick29-Mar-06 14:53
Joshua Quick29-Mar-06 14:53 
QuestionViewing Exchange Calendar Pin
ddamico987629-Mar-06 6:13
ddamico987629-Mar-06 6:13 
QuestionVb 6.0 and database problem.. Pin
LeRoiScorpion29-Mar-06 5:59
LeRoiScorpion29-Mar-06 5:59 
GeneralRe: Vb 6.0 and database problem.. Pin
Guffa29-Mar-06 6:09
Guffa29-Mar-06 6:09 
GeneralRe: Vb 6.0 and database problem.. Pin
LeRoiScorpion29-Mar-06 6:13
LeRoiScorpion29-Mar-06 6:13 
Questioncanny edge detection in vb.net Pin
preci29-Mar-06 5:35
preci29-Mar-06 5:35 
AnswerRe: canny edge detection in vb.net Pin
Christian Graus29-Mar-06 10:23
protectorChristian Graus29-Mar-06 10:23 
QuestionHow can I Insert a .swf file in my form Pin
scorp_scorp29-Mar-06 5:07
scorp_scorp29-Mar-06 5:07 
AnswerRe: How can I Insert a .swf file in my form Pin
HaloZa29-Mar-06 6:08
HaloZa29-Mar-06 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.