WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MW4 on June 24, 2014, 12:50:06 PM

Title: Run script not working
Post by: MW4 on June 24, 2014, 12:50:06 PM
In setting a startup script as a one processor in a quad core machine, I hit this snag...

The following shortcut target works in Win7:

     C:\Windows\System32\cmd.exe /C START "Access 2003" /high /affinity 1 "C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE" c:\db\fleetFE.mde /wrkgrp \\fleetdc01\Fleet\data\mdw\fleet.mdw

This code does not

     AccessPath = 'C:\Windows\System32\cmd.exe /C START "Access 2003" /high /affinity 1 "C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE"'
     ppath='c:\db\fleeFE.mde /wrkgrp \\fleedc01\Flee\data\mdw\flee.mdw'

     Run(accesspath,ppath)


Any thoughts??
Title: Re: Run script not working
Post by: Deana on June 24, 2014, 01:08:27 PM
Only pass cmd.exe as the first parameter, then everything else as the second parameter to the Run.


Code (winbatch) Select

cmd_64 = DirWindows(0):'Sysnative\CMD.EXE'
Run(cmd_64,`/C START "Access 2003" /high /affinity 1 "C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE" "c:\db\fleetFE.mde" /wrkgrp "\\fleetdc01\Fleet\data\mdw\fleet.mdw"`)


Reference: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/64-bit+CMD~File~Redirection.txt
Title: Re: Run script not working
Post by: MW4 on June 24, 2014, 01:21:58 PM
OK, thanks!!!!
Title: Re: Run script not working
Post by: MW4 on June 24, 2014, 01:45:06 PM
What if I deploy to machines that some are 32 some 64?
Is there a quick way to determine win7 32 vs 64?
Title: Re: Run script not working
Post by: Deana on June 24, 2014, 01:49:54 PM
Quote from: MW4 on June 24, 2014, 01:45:06 PM
What if I deploy to machines that some are 32 some 64?
Is there a quick way to determine win7 32 vs 64?

I like to use WinMetrics.

Code (winbatch) Select
If WinMetrics(-7)|WinMetrics(-2)==3 Then Pause('Windows Bitness','64-bit Platform')
Else Pause('Windows Bitness','32-bit Platform')


http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/64-bit+How~To~Check~If~Computer~Is~Running~A~32~Bit~or~64~Bit~Operating~System.txt
Title: Re: Run script not working
Post by: MW4 on June 24, 2014, 01:55:04 PM
Sorry, I saw that link just after I asked that question, THANKS AGAIN!!!