Writing to output file fails after build

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
IanUoY
Posts: 77
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Wed Jul 31, 2013 2:09 am

Writing to output file fails after build

Post by IanUoY »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio 2020
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***

I've been working on a utility that deals with user management, and I want to record changes to a log file, a simple text file.

Quite simply I've defined the file eg:

$disableInactiveLogFile = "I:\Powershell\ExStaff\DisableInactiveUsers.txt"

When I run the applicaion, everything works fine. The information is appended to the file. However, in Deploy if I build and Run, the application runs fine, except it does not append any information to the above log file.

I've no idea why this is and cannot located a reason.

Regards

Ian


DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

User avatar
Alexander Riedel
Posts: 7344
Joined: Tue May 29, 2007 4:43 pm

Re: Writing to output file fails after build

Post by Alexander Riedel »

[Topic moved by moderator]
Please provide some code how you write to that file. Most commonly you do not not have permission from the process or the drive letter simply is not mapped.
Alexander Riedel
SAPIEN Technologies, Inc.

Locked