Soldiers of Fortune Forums: VBSCript Question - Soldiers of Fortune Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VBSCript Question A little help

#1 User is offline   bluemeenie Icon

  • Posse Dittohead
  • PipPipPipPipPip
  • Group: -=SoF=- Member
  • Posts: 6,365
  • Joined: 25-August 03

Posted 31 August 2006 - 11:19 AM

I am uninstalling a couple of differant software packages (in MSI form) over the network via altiris, and i am running into a problem where the second one is erroring out becuase the first on is not finished with its task.

My question is, can i put in a VBScirpt wait command after a dos command and have it work together.


Exm. of what im tryingto do.


(this is in the run script window now)


****Task 1****
REM **** Unistall Java JRE 1.5.0_6
C:\Windows\System32\MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /q


****task 2****

REM **** Uninstall SAV 9.0.0_338
C:\Windows\System32\MsiExec.exe /UNINSTALL {848AC794-8B81-440A-81AE-6474337DB527} /qn


So can i put the sleept script at the ocmpletion of the first task??

Exm.

****Task 1****
REM **** Unistall Java JRE 1.5.0_6
C:\Windows\System32\MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /q
wscript.sleep(10000)

**and then have it sleep before moving to next task?***

****task 2****

REM **** Uninstall SAV 9.0.0_338
C:\Windows\System32\MsiExec.exe /UNINSTALL {848AC794-8B81-440A-81AE-6474337DB527} /qn

Quote

"Keep, ancient lands, your storied pomp!" cries she with silent lips.
"Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore,
Send these, the homeless, tempest-post to me,
I lift my lamp beside the golden door!"



Quote

"the first mainstream African-American who is articulate and bright and clean and a nice-looking guy. I mean, that's a storybook, man." - Joe Biden on Barrack Obama
0

#2 User is offline   bluemeenie Icon

  • Posse Dittohead
  • PipPipPipPipPip
  • Group: -=SoF=- Member
  • Posts: 6,365
  • Joined: 25-August 03

Posted 31 August 2006 - 11:57 AM

Or am i just gonna have to create a full script that does all... liek below.



Dim objShell

Set objShell = Wscript.CreateObject("WScript.Shell")
objshell.Run "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /q" ' Uninstall Java 1.5

wscript.sleep (40000)

objshell.Run "MsiExec.exe /x {848AC794-8B81-440A-81AE-6474337DB527} /qn" ' Uninstall SAV 9.0.0_338

wscript.sleep (40000)

Quote

"Keep, ancient lands, your storied pomp!" cries she with silent lips.
"Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore,
Send these, the homeless, tempest-post to me,
I lift my lamp beside the golden door!"



Quote

"the first mainstream African-American who is articulate and bright and clean and a nice-looking guy. I mean, that's a storybook, man." - Joe Biden on Barrack Obama
0

#3 User is offline   Rip Icon

  • Posse Headshot Artiste
  • PipPipPipPipPip
  • Group: -=SoF=- Member
  • Posts: 4,589
  • Joined: 01-February 02

Posted 31 August 2006 - 06:28 PM

It is 1/1000 of a second.
"To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public."
Theodore Roosevelt
0

#4 User is offline   bluemeenie Icon

  • Posse Dittohead
  • PipPipPipPipPip
  • Group: -=SoF=- Member
  • Posts: 6,365
  • Joined: 25-August 03

Posted 01 September 2006 - 06:10 AM

View PostLazerTag, on Aug 31 2006, 05:22 PM, said:

Are those commands being run from a batch file? If so you could use the sleep command.


Otherwise in VB script


WScript.Sleep 5000


This would sleep for 5 seconds. I think it's 1/1000 of a second



yes there being run from a batch file now. and im wscript.sleep (40000) (40 sec. sleep)


The sleep command didnt seem to be working for dos, maybe im using it wrong. but the script worked.

Quote

"Keep, ancient lands, your storied pomp!" cries she with silent lips.
"Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore,
Send these, the homeless, tempest-post to me,
I lift my lamp beside the golden door!"



Quote

"the first mainstream African-American who is articulate and bright and clean and a nice-looking guy. I mean, that's a storybook, man." - Joe Biden on Barrack Obama
0

#5 User is offline   bluemeenie Icon

  • Posse Dittohead
  • PipPipPipPipPip
  • Group: -=SoF=- Member
  • Posts: 6,365
  • Joined: 25-August 03

Posted 27 September 2006 - 02:28 PM

windows XP...and the script is working like a charm now, sorry i didn't provide feedback (forgot :) ).


I just had to work out a reboot suppress function into the uninstall command.

Quote

"Keep, ancient lands, your storied pomp!" cries she with silent lips.
"Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore,
Send these, the homeless, tempest-post to me,
I lift my lamp beside the golden door!"



Quote

"the first mainstream African-American who is articulate and bright and clean and a nice-looking guy. I mean, that's a storybook, man." - Joe Biden on Barrack Obama
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic