INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

wshshell not running

wshshell not running

(OP)
what is wrong here

CODE --> vbscript

Set wshShell = CreateObject("WScript.Shell")
strKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration"
strValue = "Platform" 
strData = "x86"
On Error Resume Next
strData = wshShell.RegRead(strKey & "\" & strValue)
On Error Goto 0 
Select Case strData
    Case ""
        MsgBox "Reg value '" & strKey & "\" & strValue & "' Not Found."
        WshShell.Run Chr(34) & "\\dbngt05\software$\Mimecast\O365 CTR\setup.exe - CTR" & Chr(34)
		
    Case "x86"
        MsgBox "reg data = x86, Quitting."
        WshShell.Run Chr(34) & "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (32 bit)\Mimecast for Outlook 7.3.2061.19940 (32 bit).msi" /qn & Chr(34), 0, False
		
    Case "x64"
        WshShell.Run "MsiExec.exe /qn /x{A5C7145D-8E1B-44CD-99A3-AC242628C115}"
        WshShell.Run Chr(34) & "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (64 bit)\Mimecast for Outlook 7.3.2061.19940 (64 bit).msi" /qn & Chr(34), 0, True

    Case Else
        MsgBox "Unexpected data found in reg value '" & strKey & "\" & strValue & "'.  Data = " & strData
        WScript.Quit
End Select 

MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP

RE: wshshell not running

You may need to help us out here, since 'wshshell not running" isn't really specific enough.

RE: wshshell not running

Do you get an error if you comment out line 5?

RE: wshshell not running

(OP)
Removed on error resume next and get Error line 20 Chr(..)
then tried
WshShell.Run "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (64 bit)\Mimecast for Outlook 7.3.2061.19940 (64 bit).msi" /qn, 0, True
and get line 20 type mismatch 'wshshell'
any ideas

MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP

RE: wshshell not running

WshShell.Run "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (64 bit)\Mimecast for Outlook 7.3.2061.19940 (64 bit).msi" /qn, 0, True


RE: wshshell not running

(OP)
strongm, I dont see any difference, BTW I did copy and paste yours still same errors

MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP

RE: wshshell not running

No, I'm flagging that you cannot use the /qn - at least not the way you are. Was trying to give you a hint rather than the fix, which should be

WshShell.Run "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (64 bit)\Mimecast for Outlook 7.3.2061.19940 (64 bit).msi /qn", 0, True

RE: wshshell not running

(OP)
strongm, your way does not work to run the file Mimecast for Outlook 7.3.2061.19940 (64 bit).msi" /qn is correct (see below)

DOS

CODE --> dos

U:\Mimecast\Mimecast for Outlook 7.3.2061.19940 (32 bit)>"Mimecast for Outlook 7.3.2061.19940 (32 bit).msi /qn"
The directory name is invalid. 
Run the way in my code works

CODE --> dos

U:\Mimecast\Mimecast for Outlook 7.3.2061.19940 (32 bit)>"Mimecast for Outlook 7.3.2061.19940 (32 bit).msi" /qn
Works fine 


Windows ® Installer. V 5.0.7601.23593

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]

MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP

RE: wshshell not running

From the commandline yes, but you cannot pass the same string to the wshShell run command. You have to wrap it up properly. Which you are not (but then, neither am I really, as I forgot that Run hiccups when faced with a path name with spaces AND a parameter needing to be passed).

WshShell.Run Chr(34) & "\\dbngt05\software$\Mimecast\Mimecast for Outlook 7.3.2061.19940 (64 bit)\Mimecast for Outlook 7.3.2061.19940 (64 bit).msi" & Chr(34) &" /qn", 0, TRUE

(and you'll need to do the same for the 32bit line as well)

RE: wshshell not running

(OP)
Thanks, strongm learnt something new

MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close