The search returned 17 results

by Albin
May 16, 2022 - 11:40
Forum: WAPT Packages
Subject: Problem executing a package containing a script in session setup mode
Answers: 3
Views : 2704

Re: Problem executing a package containing a script in session setup mode

Hello again,

thank you for your reply. As I explained in my previous message, I need to be able to control the execution because the principle of triggering at

startup doesn't meet our constraints (mapping of resources that may be unavailable at startup).

There is no...
by Albin
May 16, 2022 - 10:22
Forum: WAPT Packages
Subject: Problem executing a package containing a script in session setup mode
Answers: 3
Views : 2704

Problem executing a package containing a script in session setup mode

Hello,

I have a package that runs a script in session setup mode. When I run the package on a computer, it doesn't work, but the script itself runs fine.
The script in question:

`def install():
run(r'wapt-get session-setup test')`

Apparently, this mode only allows execution on...
by Albin
May 4, 2022 - 12:18
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

Hello,

I ran the script in question.
After the script ran, I executed the command `wapt-get session-setup Printer -f` as requested.
Unfortunately, I had to restart the computer for it to work; is this normal?
Is it possible to run the script...?
by Albin
May 3, 2022 - 4:18 PM
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

I ran the command: powershell.exe -executionpolicy bypass c:\testwapt.ps1 and the change was successfully applied to my machine.

Regards,

Albin
by Albin
May 3, 2022 - 4:04 PM
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

Hello,

Yes, that is indeed the name of my package.

I ran the command: `wapt-get session-setup Printer -f` and I got this result

: `Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Configuring Printer ...
Done`.

It indicates the package configuration is complete, but the modification is not...
by Albin
May 2, 2022 - 4:19 PM
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

I ran the command again with the package name.
Here's the message I got:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Configuring Printer_0-wapt ...
2022-05-02 16:17:16,250 CRITICAL Exception: Package Printer_0-wapt is not installed.

Regards,

Albin
by Albin
May 2, 2022 - 12:02
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

Hello again,

I ran the command and I got this message

: Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Configuring testwapt.ps1 ...
2022-05-02 12:00:05,183 CRITICAL Exception: Package testwapt.ps1 is not installed

. Regards,

Albin
by Albin
May 2, 2022 - 11:08
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

Hello,
we tested your script, we don't have any errors in the wapt console, but it still doesn't work.


# -*- coding: utf-8 -*-
from setuphelpers import *

def install():
filecopyto('testwapt.ps1',r'c:\testwapt.ps1')

def session_setup() :
run_powershell_from_file(r"c ...
by Albin
April 28, 2022 - 10:07 AM
Forum: WAPT Server
Subject: [SOLVED] Problem executing a PowerShell script using the PowerShell run function
Answers: 26
Views : 24602

Re: Problem executing a PowerShell script using the PowerShell run function

I re-ran my script with the `run_powershell_from_file` command;
here is the code
: # -*- coding: utf-8 -*-
from setuphelpers import *

# Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
# Declaring global variables - Warnings: 1) WAPT context is only ...