none
run ps1 script

Answers

  • Hi,

     

    As a work around, you can write a batch file to achieve this. Open a notepad, input the following command:

     

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit “location of ps1 file”

     

    Save the file as double.bat.

     

    Then you should be able to double click on the double.bat file to run the ps1 file.

     

    Best Regards

    Dale


    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. ”
    Friday, December 10, 2010 5:40 AM
    Moderator
  • There are a few commercial products which include a Script packager, like AdminScriptEditor (which is the only one i've used myself) and Primalscript, and i think there are some standalone tools for that, but i dont have a link available.

    There are also scripts from Keith Hill (Make-PS1ExeWrapper ) and from Johan Akerstrom which should do the trick, but i haven't tried them yet.

    Denniver

     

    Friday, December 10, 2010 2:06 PM

All replies

  • of course, if you change the file association of the ps1-files to powershell.exe. Or you can look for a script-to-exe packager, there are a few out there.

    Friday, December 10, 2010 3:47 AM
  • Hi,

     

    As a work around, you can write a batch file to achieve this. Open a notepad, input the following command:

     

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit “location of ps1 file”

     

    Save the file as double.bat.

     

    Then you should be able to double click on the double.bat file to run the ps1 file.

     

    Best Regards

    Dale


    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. ”
    Friday, December 10, 2010 5:40 AM
    Moderator
  • And you can put the same line in a new shortcut instead of a bat.
    Friday, December 10, 2010 11:37 AM
  • Hello I'm interessing about script-to-exe packager which you mentioned here. Please post some link.

    Thanks.


    PEDRO
    • Proposed as answer by p3dr01n Friday, December 10, 2010 1:09 PM
    Friday, December 10, 2010 12:31 PM
  • There are a few commercial products which include a Script packager, like AdminScriptEditor (which is the only one i've used myself) and Primalscript, and i think there are some standalone tools for that, but i dont have a link available.

    There are also scripts from Keith Hill (Make-PS1ExeWrapper ) and from Johan Akerstrom which should do the trick, but i haven't tried them yet.

    Denniver

     

    Friday, December 10, 2010 2:06 PM
  • Thanks
    PEDRO
    Wednesday, December 15, 2010 3:25 PM