PC Review Forums Newsgroups Windows Vista Windows Vista General Discussion Run app located in network share from command prompt...

Reply

Run app located in network share from command prompt...

 
Thread Tools Rate Thread
Old 08-05-2008, 09:58 AM   #1
chaitu
Guest
 
Posts: n/a
Default Run app located in network share from command prompt...


Hi,

I am running Vista Business Edition
I have a shared folder c:\share on my hard drive, and I mapped that to
my z: Now from command prompt which is launched with Admin privileges,
i am not able to run any application located in Z:. for example Z:
\test.exe...It gives an error - System cannot find the drive
specified.

How should i resolve this or in vista, we cant run any application
located in network share from command prompt?

thanks...



  Reply With Quote
Old 08-05-2008, 10:44 AM   #2
Synapse Syndrome
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

"chaitu" <chaitanyagsk@gmail.com> wrote in message
news:73b8f12c-2ac3-4737-b11d-84cbaa445ba5@h1g2000prh.googlegroups.com...
> Hi,
>
> I am running Vista Business Edition
> I have a shared folder c:\share on my hard drive, and I mapped that to
> my z: Now from command prompt which is launched with Admin privileges,
> i am not able to run any application located in Z:. for example Z:
> \test.exe...It gives an error - System cannot find the drive
> specified.
>
> How should i resolve this or in vista, we cant run any application
> located in network share from command prompt?



Can you make Z: the current directory? If not, it might be because the
drive mapping was not made in the elevated Admin account. The drive mapping
only exists in your normal user account.

Try mapping the drive using NET USE, or using PUSHD and POPD, in the
elevated command prompt and see if it works then.

ss.


  Reply With Quote
Old 08-05-2008, 11:26 AM   #3
chaitu
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

Its working perfectly. What is the difference in the way i mapped to
a network drive using 'Map Network Drive' option from explorer and Net
Use command?

Also, i have a problem related to this. I have an installation package
which can be installed from a network drive. Once installation package
is launched, it should know from which drive its launched. For this, i
am using GetCommandLine() MFC function. Problem is, suppose,
installation package say setup.exe is located in Znetwork location).
When setup.exe is launched with standard user privileges, then
GetCommandLine() is returning Z:\setup.exe. But when setup.exe is
launched with admin privileges, it's returning with UNC path i.e.
<UNCPath>\setup.exe

Now i checked the above behaviour by mapping network drive using
Net Use command. In this case, even when setup.exe is launched with
admin privileges, GetCommandLine() is returning Z:\setup.exe which i
want.

I cant tell the user to map to a network drive using Net Use
command. He maps using 'Connect to a network drive' option available
in the explorer. Can we achieve the same behaviour with this option?

thanx for the help...
  Reply With Quote
Old 09-05-2008, 09:25 AM   #4
Synapse Syndrome
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

"chaitu" <chaitanyagsk@gmail.com> wrote in message
news:4e88a1f0-b437-459e-aa11-f571da626554@p39g2000prm.googlegroups.com...
> Its working perfectly. What is the difference in the way i mapped to
> a network drive using 'Map Network Drive' option from explorer and Net
> Use command?
>
> Also, i have a problem related to this. I have an installation package
> which can be installed from a network drive. Once installation package
> is launched, it should know from which drive its launched. For this, i
> am using GetCommandLine() MFC function. Problem is, suppose,
> installation package say setup.exe is located in Znetwork location).
> When setup.exe is launched with standard user privileges, then
> GetCommandLine() is returning Z:\setup.exe. But when setup.exe is
> launched with admin privileges, it's returning with UNC path i.e.
> <UNCPath>\setup.exe
>
> Now i checked the above behaviour by mapping network drive using
> Net Use command. In this case, even when setup.exe is launched with
> admin privileges, GetCommandLine() is returning Z:\setup.exe which i
> want.
>
> I cant tell the user to map to a network drive using Net Use
> command. He maps using 'Connect to a network drive' option available
> in the explorer. Can we achieve the same behaviour with this option?



I gave up on Vista last August precisely because of all this stupidity. I
use my Vista Ultimate licence on a HTPC, as Media Centre is pretty good on
it, but there is nothing else in Vista that is particularly useful. Instead
of this UAC crap, I just use RUNAS for everything, from a Power User
account, with XP.

I cannot check right now, but is it possible to right click the Explorer
icon, and run as Admin?

ss.


  Reply With Quote
Old 09-05-2008, 12:48 PM   #5
Bob Eyster
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

In the quick launch tool bar you can.

--

Bob Eyster
MS Windows Vista Home Premium



"Synapse Syndrome" <synapse@NOSPAMsyndrome.me.uk> wrote in message
news:%23lIadabsIHA.4876@TK2MSFTNGP02.phx.gbl...
> "chaitu" <chaitanyagsk@gmail.com> wrote in message
> news:4e88a1f0-b437-459e-aa11-f571da626554@p39g2000prm.googlegroups.com...
>> Its working perfectly. What is the difference in the way i mapped to
>> a network drive using 'Map Network Drive' option from explorer and Net
>> Use command?
>>
>> Also, i have a problem related to this. I have an installation package
>> which can be installed from a network drive. Once installation package
>> is launched, it should know from which drive its launched. For this, i
>> am using GetCommandLine() MFC function. Problem is, suppose,
>> installation package say setup.exe is located in Znetwork location).
>> When setup.exe is launched with standard user privileges, then
>> GetCommandLine() is returning Z:\setup.exe. But when setup.exe is
>> launched with admin privileges, it's returning with UNC path i.e.
>> <UNCPath>\setup.exe
>>
>> Now i checked the above behaviour by mapping network drive using
>> Net Use command. In this case, even when setup.exe is launched with
>> admin privileges, GetCommandLine() is returning Z:\setup.exe which i
>> want.
>>
>> I cant tell the user to map to a network drive using Net Use
>> command. He maps using 'Connect to a network drive' option available
>> in the explorer. Can we achieve the same behaviour with this option?

>
>
> I gave up on Vista last August precisely because of all this stupidity. I
> use my Vista Ultimate licence on a HTPC, as Media Centre is pretty good on
> it, but there is nothing else in Vista that is particularly useful.
> Instead of this UAC crap, I just use RUNAS for everything, from a Power
> User account, with XP.
>
> I cannot check right now, but is it possible to right click the Explorer
> icon, and run as Admin?
>
> ss.
>


  Reply With Quote
Old 09-05-2008, 12:55 PM   #6
Synapse Syndrome
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

"Bob Eyster" <reyster1@comcast.net> wrote in message
news:ewEP1LdsIHA.3780@TK2MSFTNGP03.phx.gbl...
>> I cannot check right now, but is it possible to right click the Explorer
>> icon, and run as Admin?

>
> In the quick launch tool bar you can.



In that case his user can make the drive mappings in the elevated Explorer
window.

ss.


  Reply With Quote
Old 10-05-2008, 04:16 PM   #7
chaitu
Guest
 
Posts: n/a
Default Re: Run app located in network share from command prompt...

thanks....i think this is the best approach i can tell to my user i.e.
launch explorer.exe from C:\windows using run as administrator and
then map to a network drive.
I am just wondering if can we get map a network drive option by
launching some .exe might be one of C:\windows executables???
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off