Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Running PowerShell from USB thumb driive

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2008   #1 (permalink)
Thorsten Kampe
Guest
 
Posts: n/a

Running PowerShell from USB thumb driive

Has anyone successfully managed to run PowerShell from a USB
stick/thumb drive (in other words without installing to C:\Windows)?

Any tips welcome...

Thorsten
 
Old 01-10-2008   #2 (permalink)
RichS
Guest
 
Posts: n/a

RE: Running PowerShell from USB thumb driive

Not sure it will as there are no install options to change where it installs
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Thorsten Kampe" wrote:
Quote:

> Has anyone successfully managed to run PowerShell from a USB
> stick/thumb drive (in other words without installing to C:\Windows)?
>
> Any tips welcome...
>
> Thorsten
>
 
Old 01-10-2008   #3 (permalink)
Thorsten Kampe
Guest
 
Posts: n/a

RE: Running PowerShell from USB thumb driive

* RichS (Thu, 10 Jan 2008 12:39:00 -0800)
Quote:

> Not sure it will as there are no install options to change where it
> installs
I know - but you can unpack the MSI installation file or move %
SystemRoot%\system32\WindowsPowerShell\v1.0 to the flash drive. It
just doesn't work to start it from there.

Thorsten
 
Old 01-10-2008   #4 (permalink)
Kirk Munro [MVP]
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

I'm very interested in this topic, more for general .net applications and
not specifically for PowerShell, but haven't made the time to research it
more than a few hours over the holidays.

Questions I have that I was hoping to answer at some point:
1. Do .net applications work from thumb drives at all? If so, what do you
have to do wrt .net registering components when you go to a system that
doesn't have the application in question installed?
2. What is done about registry settings with thumb drive applications?

I would think that using a .net application from a thumb drive would imply
that the .net components are registered and the registry is updated when you
plug the drive in and that the GAC and registry are cleaned up when you
unplug it. But I don't believe that functionality is available today. It
will be interesting to see if the outcome out of the partnership between
Microsoft and SanDISK
(http://www.informationweek.com/news/...leID=199501108)
results in support for this sort of thing.

With respect to PowerShell, it is not redistributable
(http://blogs.msdn.com/powershell/arc...30/611182.aspx) and it is
installed as an optional OS component so I'm quite skeptical that it will be
something that you can run from thumb drives. And I doubt that will change
in the future either since PowerShell 2.0's remoting feature requires
PowerShell on any machine that you manage via remoting (it seems to be the
intent that PowerShell be installed and remain installed on managed
computers, and thumb drive applications are not intended to be left behind
when the drive is removed).

--
Kirk Munro [MVP]
Poshoholic
http://poshoholic.com


"Thorsten Kampe" <thorsten@xxxxxx> wrote in message
news:MPG.21f094e1f18fd879989937@xxxxxx
Quote:

>* RichS (Thu, 10 Jan 2008 12:39:00 -0800)
Quote:

>> Not sure it will as there are no install options to change where it
>> installs
>
> I know - but you can unpack the MSI installation file or move %
> SystemRoot%\system32\WindowsPowerShell\v1.0 to the flash drive. It
> just doesn't work to start it from there.
>
> Thorsten

 
Old 01-10-2008   #5 (permalink)
Thorsten Kampe
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

* Kirk Munro [MVP] (Thu, 10 Jan 2008 16:17:37 -0500)
Quote:

> I'm very interested in this topic, more for general .net applications and
> not specifically for PowerShell, but haven't made the time to research it
> more than a few hours over the holidays.
>
> Questions I have that I was hoping to answer at some point:
> 1. Do .net applications work from thumb drives at all? If so, what do you
> have to do wrt .net registering components when you go to a system that
> doesn't have the application in question installed?
For instance Keepass (the new Alpha) works perfectly standalone from a
thumb drive (not even U3).

Thorsten
 
Old 01-10-2008   #6 (permalink)
Karl Prosser[MVP]
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

There are ways to do it, with any dotnet app, but they aren't
redistributable, and thus probably not usable due to licensing.

http://www.thinstall.com/

is one solution. and that doesn't even require having dotnet 2.0
preinstalled on the computer, because thinstall puts that inside the
portable package.

Also Jeffery Snover told me of a test that Lee Holmes did that was very
interesting - but that technique requires dotnet on the machine at least.

-Karl


Thorsten Kampe wrote:
Quote:

> Has anyone successfully managed to run PowerShell from a USB
> stick/thumb drive (in other words without installing to C:\Windows)?
>
> Any tips welcome...
>
> Thorsten
 
Old 01-17-2008   #7 (permalink)
Jacob Saaby Nielsen
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

Hey Kirk,

possibly take a look at http://www.portableapps.com, they have a guide on
how to make your
application portable. Perhaps you can use some of that info

Best Regards,
Jacob Saaby Nielsen

http://www.pipforhelvede.net
gmail: jacob DOT saaby
hotmail (IM): same as gmail
Quote:

> I'm very interested in this topic, more for general .net applications
> and not specifically for PowerShell, but haven't made the time to
> research it more than a few hours over the holidays.
>
> Questions I have that I was hoping to answer at some point:
> 1. Do .net applications work from thumb drives at all? If so, what do
> you
> have to do wrt .net registering components when you go to a system
> that
> doesn't have the application in question installed?
> 2. What is done about registry settings with thumb drive applications?
> I would think that using a .net application from a thumb drive would
> imply that the .net components are registered and the registry is
> updated when you plug the drive in and that the GAC and registry are
> cleaned up when you unplug it. But I don't believe that functionality
> is available today. It will be interesting to see if the outcome out
> of the partnership between Microsoft and SanDISK
> (http://www.informationweek.com/news/...rticleID=19950
> 1108) results in support for this sort of thing.
>
> With respect to PowerShell, it is not redistributable
> (http://blogs.msdn.com/powershell/arc...30/611182.aspx) and
> it is installed as an optional OS component so I'm quite skeptical
> that it will be something that you can run from thumb drives. And I
> doubt that will change in the future either since PowerShell 2.0's
> remoting feature requires PowerShell on any machine that you manage
> via remoting (it seems to be the intent that PowerShell be installed
> and remain installed on managed computers, and thumb drive
> applications are not intended to be left behind when the drive is
> removed).
>
> "Thorsten Kampe" <thorsten@xxxxxx> wrote in message
> news:MPG.21f094e1f18fd879989937@xxxxxx
>
Quote:

>> * RichS (Thu, 10 Jan 2008 12:39:00 -0800)
>>
Quote:

>>> Not sure it will as there are no install options to change where it
>>> installs
>>>
>> I know - but you can unpack the MSI installation file or move %
>> SystemRoot%\system32\WindowsPowerShell\v1.0 to the flash drive. It
>> just doesn't work to start it from there.
>>
>> Thorsten
>>

 
Old 01-17-2008   #8 (permalink)
Kirk Munro [MVP]
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

Thanks Jacob.

--
Kirk Munro [MVP]
Poshoholic
http://www.poshoholic.com



"Jacob Saaby Nielsen" <jacob.saaby@xxxxxx> wrote in message
news:97b6e7b82c688ca270c9b7ef9ac@xxxxxx
Quote:

> Hey Kirk,
>
> possibly take a look at http://www.portableapps.com, they have a guide on
> how to make your
> application portable. Perhaps you can use some of that info
>
> Best Regards,
> Jacob Saaby Nielsen
>
> http://www.pipforhelvede.net
> gmail: jacob DOT saaby
> hotmail (IM): same as gmail
>
Quote:

>> I'm very interested in this topic, more for general .net applications
>> and not specifically for PowerShell, but haven't made the time to
>> research it more than a few hours over the holidays.
>>
>> Questions I have that I was hoping to answer at some point:
>> 1. Do .net applications work from thumb drives at all? If so, what do
>> you
>> have to do wrt .net registering components when you go to a system
>> that
>> doesn't have the application in question installed?
>> 2. What is done about registry settings with thumb drive applications?
>> I would think that using a .net application from a thumb drive would
>> imply that the .net components are registered and the registry is
>> updated when you plug the drive in and that the GAC and registry are
>> cleaned up when you unplug it. But I don't believe that functionality
>> is available today. It will be interesting to see if the outcome out
>> of the partnership between Microsoft and SanDISK
>> (http://www.informationweek.com/news/...rticleID=19950
>> 1108) results in support for this sort of thing.
>>
>> With respect to PowerShell, it is not redistributable
>> (http://blogs.msdn.com/powershell/arc...30/611182.aspx) and
>> it is installed as an optional OS component so I'm quite skeptical
>> that it will be something that you can run from thumb drives. And I
>> doubt that will change in the future either since PowerShell 2.0's
>> remoting feature requires PowerShell on any machine that you manage
>> via remoting (it seems to be the intent that PowerShell be installed
>> and remain installed on managed computers, and thumb drive
>> applications are not intended to be left behind when the drive is
>> removed).
>>
>> "Thorsten Kampe" <thorsten@xxxxxx> wrote in message
>> news:MPG.21f094e1f18fd879989937@xxxxxx
>>
Quote:

>>> * RichS (Thu, 10 Jan 2008 12:39:00 -0800)
>>>
>>>> Not sure it will as there are no install options to change where it
>>>> installs
>>>>
>>> I know - but you can unpack the MSI installation file or move %
>>> SystemRoot%\system32\WindowsPowerShell\v1.0 to the flash drive. It
>>> just doesn't work to start it from there.
>>>
>>> Thorsten
>>>
>
>
 
Old 01-17-2008   #9 (permalink)
Karl Prosser[MVP]
Guest
 
Posts: n/a

Re: Running PowerShell from USB thumb driive

You can make a dotnet application portable very easily. other than of
course the dependance of having dotnet 2.0 already installed. Powershell
Plus and Analyzer for example are portable and designed to be able to
run of a USB stick, given that dotnet 2.0, and powershell are already
installed.

However if you presume no preexisting powershell , nor even dotnet 2.0
... you have to have ways to include these items without installing them.
which is 1) a technical challenge because they only come as installers..
application sandboxing and virtualizing technologies like
thinstall.com can solve this.. and 2) a licensing problem.. because even
if you work out how to do this, you are distributing dotnet and
powershell with your application, and MS doesn't allow this.

I don't know how thinstall is allowed to have their dotnet
virtualization. Maybe Microsoft has licensed them the privledge. Or
maybe they are doing it anyway and the radar hasn't caught them.

-Karl
 
 
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: how to see arguments with powershell when running winrs Shay Levi PowerShell 0 06-25-2008 04:27 PM
Running PowerShell Script from TaskScheduler malckelly PowerShell 3 11-22-2007 10:11 PM
Running powershell via exchange 2007 maquinaloca PowerShell 6 11-07-2007 01:45 PM
Running WMI Query in without Powershell or VBS greatbarrier86 PowerShell 5 08-23-2007 01:58 AM
Running mailto from powershell JMinahan PowerShell 2 03-06-2007 01:28 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49