GordonPrice67
IS-IT--Management
I have a script that needs to copy a file to Program Files (x86) after first running a software deployment package (Autodesk Revit, FWIW). If I launch the script directly it runs fine until it reaches the line to copy the file, and then errors out with permissions issues, as expected.
If I launch Command Prompt using Run as Administrator, it instead errors out with a Path not found back at the Revit deployment line, which ran just fine when the script was launched directly. Any thoughts on why a command prompt launched script would behave differently?
Also, is this the only way to get around the permissions issue? I understand the desire to limit scripts from writing to Program Files. But this file must be replaced for business reasons, the Autodesk installer gives me no way to address this directly (don't even get me started on how piss poor Autodesk's deployment tools are) and doing this copy manually for hundreds of machines in multiple offices is simply not viable.
Note that this script is being deployed within the AEC (Architecture, Engineer & Construction) Industry, where really advanced IT practices are not very commonplace. And the script in question almost certainly will need to be revised and edited by the IT staff over the years. So signed code is likely not an ideal solution realistically, even if it is a good solution technically.
Any help is greatly appreciated!
Gordon
If I launch Command Prompt using Run as Administrator, it instead errors out with a Path not found back at the Revit deployment line, which ran just fine when the script was launched directly. Any thoughts on why a command prompt launched script would behave differently?
Also, is this the only way to get around the permissions issue? I understand the desire to limit scripts from writing to Program Files. But this file must be replaced for business reasons, the Autodesk installer gives me no way to address this directly (don't even get me started on how piss poor Autodesk's deployment tools are) and doing this copy manually for hundreds of machines in multiple offices is simply not viable.
Note that this script is being deployed within the AEC (Architecture, Engineer & Construction) Industry, where really advanced IT practices are not very commonplace. And the script in question almost certainly will need to be revised and edited by the IT staff over the years. So signed code is likely not an ideal solution realistically, even if it is a good solution technically.
Any help is greatly appreciated!
Gordon