locked
Setenvironmentvariable shim parameters RRS feed

  • Question

  • Hi,

    i'm trying to use the 'SetEnvironmentVariable' fix to change the %TEMP% variable for an application.. however i don't seem to get any results.

    What i've tried:

    Apply fix to application, use the SetEnvironmentVariable fix with commandline 'TEMP=C:\Temp' and module include *.
    I think the syntax for the commandline is wrong but i can't even find one single bit of information on what it should be, can anyone help?

     

    Friday, August 6, 2010 10:43 AM

All replies

  • Hi,

     

    Please go to the following link and check if it is any help to your issue:

     

    Environment::SetEnvironmentVariable Method (String, String, EnvironmentVariableTarget)

     

    If the issue persists, you can refer to our MSDN forum for more help.

     

    Regards,

     

    Sabrina

     

    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.

    Monday, August 9, 2010 9:33 AM
  • Thank you for the reply, however i was talking about the setenvironmentvariable SHIM instead of the Function in .net.

    To be clear: i'm talking about the application compatibility toolkit, is there some other forum where i can discuss ACT? Haven't found it yet; these forums seem very end user related and are not a great resource.

    I did try it using that syntax: "TEMP","C:\TEMP",EnvironmentVariableTarget.Machine
    No luck though.

     

    Kind regards,

    Niels Wijnja

    Monday, August 9, 2010 2:25 PM
  • Anyone who has some inside of the command line for Shim "SetEnvironmentVariable"?
    The only hit is to separate multiple variables with a pipe (|).

    I tried already TEMP;R:\Windows;USER or "TEMP";"R:\Windows";USER or TEMP;R:\Windows
    or TEMP=R:\Windows etc. but nothing worked.

    With a script it works for the app in question

    SET TEMP=R:\Windows
    Start "MyAPP" /b "PathToMyApp"

    Thanks,

    Thomas


    Thomas -- http://www.ThomasKoetzing.de
    Tuesday, August 23, 2011 2:50 PM
  • I tried the same also, with no results.

    why there is no documentation i wander ...

    PS

    For Sabrina's such irrelevant answer i would put "-1000" :)


    Saturday, July 7, 2012 10:03 AM
  • Thomas, I ran into your query so many years later.  But I didn't have the script option available (MSIX), so I was more persistent in testing...

    The parameter "command" syntax on the SetEnvironmentVariable compatibility shim fix is

    NAME1|VALUE1|NAME2|VALUE2

    No quotation marks, no semi or full colons, no % characters around the name.


    App-V MVP & CTP Fellow. Author of AppV books: PowerShell with App-V 5, The Application Book, & Window Caching (http://www.tmurgent.com/Books)

    Monday, August 17, 2020 12:16 PM