Page 1 of 1

[SOLVED] No setuphelper for network drive connection?

Published: November 26, 2019 - 1:56 PM
by etunilim
Hello,

is it just me, or is there no setuphelper for connecting a network drive?
It could be a useful function in some cases...

(I know you might not have time to do everything... I'll look into it).

Regards,
ET

Re: No setuphelper for network drive connection?

Published: November 26, 2019 - 3:31 PM
by agauvrit
Good morning,

No, this functionality is not available in setuphelpers; it can be done manually in the user context within the session_setup() function if desired

Code: Select all

def session_setup():
    run(r'net use T: \\srvfichiers\partage\ /p:yes')
However, it should be noted that this piece of code will only be executed once per person per workstation, not at each startup.

If you wish to systematize network drives, you can do so more simply via Group Policy in Active Directory

If you ever wish to contribute to the WAPT source code with a "map_network_drive" function, that's also possible: https://github.com/tranquilit/WAPT/pulls

Alexander

Re: No setuphelper for network drive connection?

Published: November 27, 2019 - 11:53 AM
by etunilim
Hello,

the goal is to use this network setup for software installation/updates.
I've done it a few times with `net use`, and indeed,
I'd be happy to contribute; I'll take a look at it.

Thanks for the info
.

Re: No setuphelper for network drive connection?

Published: November 27, 2019 - 12:17 PM
by dcardon
Hello Etunilim
etunilim wrote: Nov 27, 2019 - 11:53 AM The goal is rather to use this network setup for installing/updating software.
I've done it a few times with net use, indeed.
I'll gladly contribute, I'll take a look at it.
Regarding this use case, I strongly advise against it. The WAPT package must be self-contained, because it's uncertain whether the network will be available when the installation starts (for example, if a waptexit command is executed when the machine shuts down on an 802.1x network with user authentication, the network will no longer be available at the time of installation). The self-contained nature of WAPT makes it more deterministic than other deployment solutions.

Sincerely,

Denis

Re: No setuphelper for network drive connection?

Published: November 28, 2019 - 3:07 PM
by etunilim
I had started with powershell to mount the network drive (I'm trying to completely abandon cmd and switch to ps systematically), hence the idea of ​​making a setup_helper: we use an internal software repository, which we often have to connect to, I didn't want to retype all the lines each time.

But because it takes up a line at the bottom, it does seem much less useful!

Just a quick note for those who might try it, to avoid tearing their hair out over escaped or unescaped backslashes that cause errors, here's a type of syntax that works:

Code: Select all

logservURL = r'\\mon.serveur.domain.fr\freeLogs$'
run('net use %s /user:user passwd' % logservURL)
run('call %s\Gimp\silent.cmd' % logservURL)
Of course, this drive should only contain free software, and access using the command credentials should be read-only. Do not, under any circumstances, do this with a drive containing sensitive data or licensed logs, and/or credentials that grant write access!

Re: No setuphelper for network drive connection?

Published: November 28, 2019 - 3:16 PM
by etunilim
Reply to dcardon:

Well aware of that.

That said, software that doesn't install on the first try will install on the next reboot (not to mention that if we notice errors in the console, we can force the installation immediately).

This method allows us to base the installation/update of open-source software on a series of centrally maintained scripts, which are used by all the deployment tools we use (depending on the sector, context, machine type, etc.): WAPT, GPO, SCCM, and even new tools we might decide to use in the future.

Our (open-source) software repository is maintained in a single location and is independent of the tool used to deploy it.

AND

Re: No setuphelper for network drive connection?

Published: November 28, 2019 - 9:44 PM
by sfonteneau
etunilim wrote: Nov 28, 2019 - 3:16 PM Well aware of that.
Just FYI and to avoid problems (from experience):

It's best to copy the binary and the script before installation in this case. If the network connection drops during installation, it can completely crash the software. You also lose the advantage of an installation that works even when the server is unavailable (e.g., on a laptop)

Also, be aware of network congestion! When the binary is in wapt, wapt will download it over time as workstations restart, thus "smoothing" the downloads. If you have an Office installation (500MB) to install on 1000 machines and all the machines shut down simultaneously, the file server must be able to distribute 500GB of the installation at once.

And the last problem is a security issue: if a binary is called from outside the package, then it is not included in the checksum, and therefore the package signature becomes useless...

Re: No setuphelper for network drive connection?

Published: Dec 2, 2019 - 3:44 PM
by etunilim
Thank you for these comments.

AND