none
Pass multiple command line parameters to Window XP Mode

    คำถาม

  • I'm trying to pass more then 1 argument to a windows xp mode application and it looks like a second parameter can not be added.

    This is the command line works:

    vmsal.exe "SVGViewer" "||b5fa4934' "SVG Viewer" f:\pic1.svgz

    This command give me an "Incorrect file association." error:

    vmsal.exe "SVGViewer" "||b5fa4934' "SVG Viewer" f:\pic1.svgz "DETAIL1"

    Is it at all possible to pass additional command line arguments to an Windows XP Mode application?

    I can not find any official documentation on vmsal.exe, where can i find any?

     

    12 พฤษภาคม 2554 14:00

ตอบทั้งหมด

  • XP Mode and WVPC derive from Virtual Server so the discussion in this blog by Ben Armstrong may help

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2005/06/16/429898.aspx


    Colin Barnhorst Windows 7 Ultimate x64 on DIY with 6GB ram.
    12 พฤษภาคม 2554 15:22
  • I've looked at that one already, but answer can not be found there. Any other suggestions?
    12 พฤษภาคม 2554 15:44
  • Hi,

     

    Thanks for posting in Microsoft TechNet Forum.

     

    Regarding to description of vmsal.exe, you could refer to the following article:

     

    Windows Virtual PC Executables

     

    And I would like to know the detailed operations on this issue.

     

    Alex Zhao

    TechNet Subscriber Support in forum.

    If you have any feedback on our support, please contact tngfb@microsoft.com


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    13 พฤษภาคม 2554 9:45
    ผู้ดูแล
  • I've already seen that article, it doesn't show what command line parameters are available.

    I've commented in that blog, asking if the exact command line parameters could be posted.

     

    The detailed operations are as following:

    We have an custom build application that uses a command line to open svgz files in the adobe svg viewer, which worked fine under windows xp.

    Regrettably adobe stopped support for the svg viewer and it does not work in windows 7.

    Adobe recommended to try to run the svg viewer in windows xp mode which seems to work fine if only the path to the .svg file is passed as a parameter.

    However, the custom build application sometimes also passes a second parameter, which is the name of the layer to be displayed (that is the DETAIL1 parameter).

    I've tried everything, but i've found no way to make it possible to pass this second parameter to the windows xp mode session.

    13 พฤษภาคม 2554 10:36
  • You cannot pass additional parameters to the VM.

    The only option i can think of is to point the xp mode application shortcut to a .bat or .vbs file and then pass the parameters within the bat/vbs.

    However not sure if that will work for your scenario.

     


    Sumesh P - Microsoft Online Community Support
    • เสนอเป็นคำตอบโดย Sumesh PModerator 17 พฤษภาคม 2554 6:45
    • ยกเลิกการนำเสนอเป็นคำตอบโดย Sumesh PModerator 20 พฤษภาคม 2554 5:59
    17 พฤษภาคม 2554 6:45
    ผู้ดูแล
  • Well i've tried replacing the exe by a batch file, that one also only excepts the path to the .svgz file as a parameter and nothing else, so then i'm confronted with the same problem again.

    I can't believe that microsoft does not provide the ability to add more then one parameter.

    I mean you are offering a solution to help out with program compatibility and do everything you can to make it look and behave like a normal windows application, but you forget to implement such a basic feature as multiple command line parameters?

     

    17 พฤษภาคม 2554 7:51
  • I am not familiar with svgviewer, from what i read it looks like an IE plugin.

    What are you tryiong to do with: vmsal.exe "SVGViewer" "||b5fa4934' "SVG Viewer" f:\pic1.svgz "DETAIL1"

    In the first example it seems you are passing the file name as a parameter. What is the additional parameter for?

    Are you actually calling IE using that shortcut after enabling the plugin? 


    Sumesh P - Microsoft Online Community Support
    • แก้ไขโดย Sumesh PModerator 17 พฤษภาคม 2554 10:47 add info
    17 พฤษภาคม 2554 10:46
    ผู้ดูแล
  • The additional parameter is a detail layer that needs to be activated when the svgz file is displayed.

    I'm not calling ie, i'm calling svgviewer.exe with that shortcut. Svgviewer.exe is a standalone application, but it could be that is does something with IE in the background.

     

    17 พฤษภาคม 2554 12:34
  • Try this out:

    In the Guest XP VM, go to the following registry key representing your app

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TsAppAllowList\Applications\b5fa4934

    Set the CommandLineSetting to 2

    Set the RequiredCommandLine to DETAIL1

    (this creates a corresponding entry in host machine here:HKCU\Software\Microsoft\Virtual PC\VPCVApps\Windows XP Mode\b5fa4934.Windows.XP.Mode)

    See if this works for you, i tested this with parameters for IE and it works well.

     

    Other option is to simply launch a command prompt [cmd.exe] as the XP mode application.

    Then launch whatever program you want from the command line. You can launch any program in XP using this method with all application supported options.

    This should meet almost all GUI scenario requirements.

     

     


    Sumesh P - Microsoft Online Community Support
    • เสนอเป็นคำตอบโดย Sumesh PModerator 18 พฤษภาคม 2554 6:41
    • ยกเลิกการนำเสนอเป็นคำตอบโดย Sumesh PModerator 20 พฤษภาคม 2554 5:59
    18 พฤษภาคม 2554 6:38
    ผู้ดูแล
  • That strategy requires me to start different apps within the same windows xp mode session.

    The problem with that is: when i add the path to the svgz file as a parameter, the windows xp mode session will only start the app that is associated with .svgz files.

    Is there a way to disable that association check?

    18 พฤษภาคม 2554 15:12
  • I am not sure i completely understand your previous post. Doesnt option1 and option2 both not work for you?

     

    Again, i didnt get the earlier post, but these are the registry entries where the file associations and settings are stored:

    HKEY_CURRENT_USER\Software\Classes\.svgz

    HKEY_CURRENT_USER\Software\Classes\5664112.Windows.XP.Mode

    HKEY_CURRENT_USER\Software\Microsoft\Virtual PC\VPCVApps\Windows XP Mode

     

    BTW do you have a download link to the tool you are using? 

     


    Sumesh P - Microsoft Online Community Support
    • แก้ไขโดย Sumesh PModerator 19 พฤษภาคม 2554 7:31 add info
    19 พฤษภาคม 2554 7:28
    ผู้ดูแล
  • This is the download link to the svg viewer:

    http://download.adobe.com/pub/adobe/magic/svgviewer/win/3.x/3.03/en/SVGView.exe

    Well based on your advise i had no other option but to create multiple apps. For each app i have set the CommandLineSetting to 2 and the RequiredCommandLine to DETAILx. We have a maximum of about 6 detail layers, so i created in total 6 apps each called DETAIL(x).

    So if i want to open svgviewer.exe with DETAIL2 as the detail layer i use this command line:

    vmsal.exe "SVGViewer" "||b5fa49c2' "Shortcut to DETAIL2" f:\pic1.svgz

    If i want to open svgviewer.exe with DETAIL3 as the detail layer i use this command line:

    vmsal.exe "SVGViewer" "||b5fa49c3' "Shortcut to DETAIL3" f:\pic1.svgz

     

    The only problem is that when i execute that, the DETAIL2 app (b5fa49c2) is completely ignored and it will only execute the original app (b5fa4934) that is associated with svgz files.

    I'm then talking about that svgz is associated with svgviewer.exe within the Windows XP mode session.

    If i restore the svgz association to the default association (internet explorer) and then try to execute one of the command lines i get an "incorrect file assocation error.".

    So unless this association check/link is somehow ignored i will never get this to work.

     





    19 พฤษภาคม 2554 8:22
  • This is what i tested earlier and seems to work fine in Win7 x86 with IE9. Atleast it can open a .svgz file, and it opens it in IE. This is a browser plugin.

    What part of this doesnt work for you in Win7?

     


    Sumesh P - Microsoft Online Community Support
    19 พฤษภาคม 2554 8:53
    ผู้ดูแล
  • I believe you when you say that you can open a .svgz file in IE, but now try adding another svgz viewer to you windows xp mode viewer, then try to open a svgz file with this other svgz viewer from the command line on you windows xp mode host, it wont work because that other viewer is not association with svgz files.

    Do you mean, what part doesn't work about svgviewer in windows 7? Well try to open a multilayer svgz file with it, it will crash.

     


    19 พฤษภาคม 2554 9:50
  • You can delete the following registry key to remove the association: HKEY_CURRENT_USER\Software\Classes\.svgz

    You will be able to open it via a command prompt, but not by double clicking the file as the association is removed.

    Hope that works for you.

     


    Sumesh P - Microsoft Online Community Support
    20 พฤษภาคม 2554 5:55
    ผู้ดูแล
  • I've tried the deleting of the association as you suggested, on both the host as well as the windows xp mode session, it didn't make a difference. 

    Even then i get the "Incorrect file assocation" error. 

    Now not only the DETAILx apps don't work anymore but the originall SVGViewer app doesn't work anymore either. Now all of them give an "Incorrect file assocation" error.

     

    So to sum it up: If you add a filepath to the vmsal.exe command, you can only start the application if the file extension in the path is associated with that app.

    Can you confirm that this conclusion is correct?

    20 พฤษภาคม 2554 8:08
  • It seems that the command line will work in only one place, either the registry or the file path passed directly not both.

     

    If you remove the association from the guest too then file association will not work.

     

     


    Sumesh P - Microsoft Online Community Support
    20 พฤษภาคม 2554 13:08
    ผู้ดูแล
  • I tried that as well, i still got the "Incorrect file assocation" error.
    20 พฤษภาคม 2554 15:39
  • I guess there is no other way out then. Users will have to launch a cmd prompt and thenlaunch the app within those.

     


    Sumesh P - Microsoft Online Community Support
    20 พฤษภาคม 2554 16:26
    ผู้ดูแล
  • Manual Publishing using a script having parameters: "CommandLineSetting": 2[Allways Require] and "RequiredCommandLine": Param1 Param2 works; follow: http://blogs.technet.com/b/windows_vpc/archive/2009/11/02/publishing-virtual-applications-in-windows-virtual-pc.aspx

    1 มีนาคม 2555 19:27