Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell script not found #2

Open
ThomasRunting opened this issue Apr 27, 2017 · 10 comments
Open

Powershell script not found #2

ThomasRunting opened this issue Apr 27, 2017 · 10 comments

Comments

@ThomasRunting
Copy link

ThomasRunting commented Apr 27, 2017

Ive packaged my ps1 and a supp folder but when the post install cmd runs powershell complains it cant find the ps1 scipt in the correct temp folder. @nickrod518

@nickrod518
Copy link
Owner

Can you provide the command you used to create the exe?

@ThomasRunting
Copy link
Author

ThomasRunting commented Apr 28, 2017

Create-EXEFrom.ps1 -PSScriptPath .\exam-setup.ps1 -SupplementalDirectoryPath .\Scripts\ -x64 -Verbose

It seems like the installer deletes the tmp folder before the post install cmd runs. Iam ussin this on win10 x64 if that helps

@nickrod518
Copy link
Owner

So is the missing file error coming from not being able to find exam-setup.ps1, or another script within the .\Scripts\ directory?

@ThomasRunting
Copy link
Author

%userprofile%\Temp\IPX000TMP\exam-setup.ps1
%userprofile%\Temp\IPX000TMP\Scripts"Extra things in here"
It deletes the IPX000TMP folder before powershell can find the exam-setup.ps1 file

@nickrod518
Copy link
Owner

Very odd, I'm unable to reproduce. I am also on Windows 10 x64. My test was to create a test.ps1 script that pauses after listing doing Get-ChildItem on the supplementary directory. I tried this with and without the -x64 switch. In both cases, the supplementary directory remained until I resumed from the pause, when it was deleted after the script finished.

Can you try using full path names in the command and see if that makes a difference?

How are you able to confirm the temp folder gets created in the first place?

@ThomasRunting
Copy link
Author

Ive done some screen caps when i run the finished exe.
vid 1
vid 2
vid 3
vlcsnap-2017-05-02-09h18m55s103
you mite need to slow down the vids

@nickrod518
Copy link
Owner

That is very odd. So one thing that sticks out is when the CMD window returns "No Instance(s) Available." and then lists the command it runs in the postinstall to initiate the script. Is the tone that comes after from UAC or is there an off-screen error? The only thing I can think of to try is manually recreating that temp folder, move your contents to it, and then try running the CMD in that window to see if some error is returned. Sorry, I don't really have any ideas and can't replicate the issue.

@SymmetryInter
Copy link

I know this is a little bit old, but I was able to reproduce this behavior. I was seeing the same thing when the script and supplemental directory were both on a USB flash drive. When performed on a .ps1 and directory that were on an internal drive (literally copied to internal from the flash drive) it worked just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ThomasRunting @nickrod518 @SymmetryInter and others