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

PSAppDeployToolkit-ExecuteAsUser.vbs : Unterminated String Constant #22

Closed
ConfigMgrGeek opened this issue May 4, 2015 · 5 comments
Closed

Comments

@ConfigMgrGeek
Copy link

Hello - I am using version 3.6.3 and within my Deploy-Application.ps1 I am making use of the following line of code:

[snip]
Set-ActiveSetup -StubExePath "$envWindir\Source\CitrixApplications\ActiveSetup\Remove-OrphanedCitrixShortcuts.ps1" -Description 'Searching for and removing orphaned Citrix Icons' -Key 'RemoveOrphanCitrixIcons' -ContinueOnError $true
[end/snip]

However, I am getting an error as noted in the subjet line above during script execution. Since Set-ActiveSetup will automatically run for the current user I am getting an error when running this as an "available" program from Software Center in ConfigMgr 2012 R2 CU3. I noticed line 4005 in AppDeployToolkitMain.ps1 if I remove the final ['"'} the error goes away but I am concerned this will affect other areas of the toolkit. I had this issue with 3.6.2 and 3.6.3. I haven't used earlier versions of the Toolkit.

My questions are as follows:
(1) Has anyone else witnessed this issue?
(2) How have you resolved it?

Cheers.

@ConfigMgrGeek
Copy link
Author

To add to my original message - When I open the PSAppDeployToolkit-ExecuteAsUser.vbs which remains in the C:\Users\Public\PSAppDeployToolkit directory after the error is presented I can see why the VBS is failing. There is an extra double quote in the string below:

[snip]
strCommand = chr(34) & "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" & chr(34) & " -ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -File " & chr(34) & "C:\Windows\Source\CitrixApplications\ActiveSetup\Remove-OrphanedCitrixShortcuts.ps1""
[end/snip]

I remove the double quote from line 4005 in the main.ps1 as mentioned above it seems to subside. Please note, I only see this issue when running the package via ConfigMgr. Double-clicking on the EXE manually does not yield this result. Any help would be greatly appreciated.

@mmashwani
Copy link
Contributor

Thanks for reporting this bug. I've accepted your fix and it is now included in the latest 3.6.4 beta located here: https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/tree/master/Toolkit/AppDeployToolkit

@mmashwani mmashwani added this to the v3.6.4 milestone May 5, 2015
@mmashwani mmashwani self-assigned this May 5, 2015
@ConfigMgrGeek
Copy link
Author

Thank you!

@mmashwani
Copy link
Contributor

Re-opening issue as I don't like to close them until we finalize the release so that others that come to create an issue are more likely to see if their same issue has already been reported. I think they will be less likely to see the issue if it's already been closed.

@mmashwani
Copy link
Contributor

I'm getting a report that the change we made for this ticket is causing a problem:
#38

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

No branches or pull requests

2 participants