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.
executable in a subfolder
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
- sfonteneau
- WAPT Expert
- Messages: 2318
- Registered: July 10, 2014 - 11:52 PM
- Contact :
Hi
I also made a package for SolidWorks
For your information, my package setup.py looks like this:
It therefore includes subfolder functionality:
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'))
-
Rockspirit
- Messages: 2
- Registration: Nov 05, 2015 - 5:09 p.m.
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:
I'm copying the contents of my setup.py file:
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:
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."TimeoutExpired: Command '('"sldim\\sldIM.exe" /adminclient /new /source ".\\AdminDirector.xml"',)' timed out after 4800 seconds with output ''
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])
