Page 1 of 1

executable in a subfolder

Published: November 6, 2015 - 9:36 AM
by Rockspirit
Hello,

I'm creating a package to deploy SolidWorks.
The executable I'm using is located in a subfolder:

`.\sldmi\sldim.exe`.

I tested my command line via cmd:
`.\sldim\sldIM.exe" /adminclient /new /source ".\AdminDirector.xml"`.

The installation goes smoothly. However, when I integrate it into WAPT using the `*.py` file via this command line:

`run(r'".\sldim\sldIM.exe" /adminclient /new /source ".\AdminDirector.xml"')`,
it no longer works. I imagine it must be a syntax issue.

Is it possible to launch an `*.exe` file from a subfolder via WAPT?

I've done some testing, but the time it takes to create and deploy the package is quite long, given the size of SolidWorks. So if anyone has an idea to save me from doing dozens of tests, I would be very grateful.

Re: Exe in a subfolder

Published: November 6, 2015 - 11:27
by sfonteneau
Hi

I also made a package for SolidWorks

For your information, my package setup.py looks like this:

It therefore includes subfolder functionality:

Code: Select all

def install():
    allusersprofile = os.environ['ALLUSERSPROFILE']
    print('installing smp-solidworks')
    cmd ='msiexec /i "SolidWorks2008\French_i386_SolidWorks.msi"     TRANSFORMS="SolidWorks2008\French_i386_SolidWorks.mst" /qb'
    run(cmd,timeout=4800,accept_returncodes=[1641,3010,0])
    print('installing Licence solidworks')
    shutil.move('SolidWorksStandaloneLic.lic', makepath(allusersprofile,'SolidWorks'))
    

Re: Exe in a subfolder

Published: January 19, 2016 - 2:31 PM
by Rockspirit
Good morning

I apologize for the late reply. I've had quite a few projects to finish and I've been a bit overwhelmed by events.

Thank you for taking the time to reply. Your answer was very helpful.

I recently revisited the Solidworks deployment via WAPT. Now, Solidworks installs correctly on the machine, but I'm getting an error on the WAPT side:
"TimeoutExpired: Command '('"sldim\\sldIM.exe" /adminclient /new /source ".\\AdminDirector.xml"',)' timed out after 4800 seconds with output ''
So, it's as if it's not installed on the WAPT side, but it is installed on the machine and it works very well.

I'm copying the contents of my setup.py file:
def install():
print('installing solidworks')
cmd='"sldim\sldIM.exe" /adminclient /new /source ".\AdminDirector.xml"'
run(cmd,timeout=4800,accept_returncodes=[1641,3010,0])