Hi all -

I need to run an application off a shared network drive. I am
having problems with writing the script that will access the network
drive (since I need to specify parameters and the network drive name
has a space in it). I have no problems running it off the command
line, but with the spaces and quotes in VBScript, things get messed
up.

I need to run this line with VB Script, anyone with any ideas ?
(All on one line)

\\Software share\Clients\W32Intel\Setup.exe -s -f1
\\Software share\Clients\W32Intel\setup.iss"

I'm looking for something like this :
set ws = wscript.createobject("wscript.shell")
ws.run("\\Software share\Clients\W32Intel\Setup.exe -s -f1 ... etc")

I have tried several combinations of """, "", and " with no luck :-)

Thanks for your help.

Re: Spaces and parameters query for VB Script by Ray

Ray
Tue Oct 21 21:57:36 CDT 2003

Shouldn't there be a server in the beginning of your UNC path?

Also, fire the person who named a share with a space in it.

ws.run """\\software share\clients\w32intel\setup.exe -s -f1..."""

Does that not work? If not, perhaps the issue is the lack of a server name,
i.e.

ws.run """\\servername\software share\client\w32intel\setup.exe...."""

Ray at home

"jonathan fernandes" <jonfernandes@yahoo.com> wrote in message
news:fd9b8614.0310211808.8ffc2fa@posting.google.com...
> Hi all -
>
> I need to run an application off a shared network drive. I am
> having problems with writing the script that will access the network
> drive (since I need to specify parameters and the network drive name
> has a space in it). I have no problems running it off the command
> line, but with the spaces and quotes in VBScript, things get messed
> up.
>
> I need to run this line with VB Script, anyone with any ideas ?
> (All on one line)
>
> \\Software share\Clients\W32Intel\Setup.exe -s -f1
> \\Software share\Clients\W32Intel\setup.iss"
>
> I'm looking for something like this :
> set ws = wscript.createobject("wscript.shell")
> ws.run("\\Software share\Clients\W32Intel\Setup.exe -s -f1 ... etc")
>
> I have tried several combinations of """, "", and " with no luck :-)
>
> Thanks for your help.



Re: Spaces and parameters query for VB Script by Phil

Phil
Wed Oct 22 00:11:26 CDT 2003

Add your server name to the UNC path, then use a filesystemobject to get the
ShortPath from the file object & use that to run the program. There are
good examples in the Windows Script 5.6 help.

"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:eJBKkfEmDHA.2732@TK2MSFTNGP11.phx.gbl...
> Shouldn't there be a server in the beginning of your UNC path?
>
> Also, fire the person who named a share with a space in it.
>
> ws.run """\\software share\clients\w32intel\setup.exe -s -f1..."""
>
> Does that not work? If not, perhaps the issue is the lack of a server
name,
> i.e.
>
> ws.run """\\servername\software share\client\w32intel\setup.exe...."""
>
> Ray at home
>
> "jonathan fernandes" <jonfernandes@yahoo.com> wrote in message
> news:fd9b8614.0310211808.8ffc2fa@posting.google.com...
> > Hi all -
> >
> > I need to run an application off a shared network drive. I am
> > having problems with writing the script that will access the network
> > drive (since I need to specify parameters and the network drive name
> > has a space in it). I have no problems running it off the command
> > line, but with the spaces and quotes in VBScript, things get messed
> > up.
> >
> > I need to run this line with VB Script, anyone with any ideas ?
> > (All on one line)
> >
> > \\Software share\Clients\W32Intel\Setup.exe -s -f1
> > \\Software share\Clients\W32Intel\setup.iss"
> >
> > I'm looking for something like this :
> > set ws = wscript.createobject("wscript.shell")
> > ws.run("\\Software share\Clients\W32Intel\Setup.exe -s -f1 ... etc")
> >
> > I have tried several combinations of """, "", and " with no luck :-)
> >
> > Thanks for your help.
>
>



Re: Spaces and parameters query for VB Script by jonfernandes

jonfernandes
Wed Oct 22 02:39:33 CDT 2003

"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message news:<eJBKkfEmDHA.2732@TK2MSFTNGP11.phx.gbl>...
> Shouldn't there be a server in the beginning of your UNC path?

Yes there should be, I'm sorry I left that out.

> Also, fire the person who named a share with a space in it.
>
> ws.run """\\software share\clients\w32intel\setup.exe -s -f1..."""
>
> Does that not work? If not, perhaps the issue is the lack of a server name,
> i.e.
>
> ws.run """\\servername\software share\client\w32intel\setup.exe...."""

Tried this. It doesn't work :

"""\\servername\software share\client\setup.exe"""
is fine, and it works. However I need to specify the parameters, and
thats when it fails

"""\\servername\software share\client\setup.exe -s -d
\\\servername.."""
doesn't work.

Re: Spaces and parameters query for VB Script by Torgeir

Torgeir
Wed Oct 22 05:08:53 CDT 2003

jonathan fernandes wrote:

> Tried this. It doesn't work :
>
> """\\servername\software share\client\setup.exe"""
> is fine, and it works. However I need to specify the parameters, and
> thats when it fails
>
> """\\servername\software share\client\setup.exe -s -d
> \\\servername.."""
> doesn't work.

Hi

"""\\servername\software share\client\setup.exe"" -s -d ""\\\servername.."""



--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter



Re: Spaces and parameters query for VB Script by jonfernandes

jonfernandes
Wed Oct 22 10:52:23 CDT 2003

>
> """\\servername\software share\client\setup.exe"" -s -d ""\\\servername.."""

Nope. Doesn't work either.

It just executes the
""\\servername\software share\client\setup.exe"" part.

What I am doing is actually a quiet install for Lotus Notes.

The arguments are just the files used in the quiet install. (ie.
pre-configured values as to where to setup the installation etc).

1. When it works, a quiet installation takes place. I have been able
to do this using a shortcut to the network share and in the Target
section of the shortcut, I have :

"\\servername\Software share\LotusNotes\Clients\W32Intel\Setup.exe"
-s -f1 "\\servername\Software
share\LotusNotes\Clients\W32Intel\setup.iss"

and this works fine. (These are just arguments for install shield for
a quiet installation)

2. It doesn't work when I see the first screen of the install program,
this means its running the setup.exe file from the network share (and
not using the parameters).

All I am just trying to do is "map" the shortcut syntax to VBscript,
and this
seems rather intriguing :-)

Re: Spaces and parameters query for VB Script by Ray

Ray
Wed Oct 22 12:39:29 CDT 2003

Can't you change the share name? Whoever named that share should be fired.

Here's an e-mail I have to continually send to my "network services"
department where I work.

1. NEVER put spaces or dots in share names (including printers)
2. NEVER put spaces or dots in names of directories that are shared.
3. When creating shares, be careful about inadvertently leaving the
Everyone group with permissions (even if the permissions are only to read).
NTFS permissions typically default to allow everyone full control, so if
share permissions aren't setup right, people will not be stopped by NTFS.
4. NEVER put spaces in usernames.
5. Avoiding spaces in groupnames would also be a fantastic idea.

These are their top 5 assinine actions.

Ray at work




"jonathan fernandes" <jonfernandes@yahoo.com> wrote in message
news:fd9b8614.0310220752.61804e6e@posting.google.com...
> >
> > """\\servername\software share\client\setup.exe"" -s -d
""\\\servername.."""
>
> Nope. Doesn't work either.
>
> It just executes the
> ""\\servername\software share\client\setup.exe"" part.
>
> What I am doing is actually a quiet install for Lotus Notes.
>
> The arguments are just the files used in the quiet install. (ie.
> pre-configured values as to where to setup the installation etc).
>
> 1. When it works, a quiet installation takes place. I have been able
> to do this using a shortcut to the network share and in the Target
> section of the shortcut, I have :
>
> "\\servername\Software share\LotusNotes\Clients\W32Intel\Setup.exe"
> -s -f1 "\\servername\Software
> share\LotusNotes\Clients\W32Intel\setup.iss"
>
> and this works fine. (These are just arguments for install shield for
> a quiet installation)
>
> 2. It doesn't work when I see the first screen of the install program,
> this means its running the setup.exe file from the network share (and
> not using the parameters).
>
> All I am just trying to do is "map" the shortcut syntax to VBscript,
> and this
> seems rather intriguing :-)



Re: Spaces and parameters query for VB Script by jcochran

jcochran
Wed Oct 22 14:07:51 CDT 2003

On 22 Oct 2003 00:39:33 -0700, jonfernandes@yahoo.com (jonathan
fernandes) wrote:

>"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message news:<eJBKkfEmDHA.2732@TK2MSFTNGP11.phx.gbl>...
>> Shouldn't there be a server in the beginning of your UNC path?
>
>Yes there should be, I'm sorry I left that out.
>
>> Also, fire the person who named a share with a space in it.
>>
>> ws.run """\\software share\clients\w32intel\setup.exe -s -f1..."""
>>
>> Does that not work? If not, perhaps the issue is the lack of a server name,
>> i.e.
>>
>> ws.run """\\servername\software share\client\w32intel\setup.exe...."""
>
>Tried this. It doesn't work :
>
> """\\servername\software share\client\setup.exe"""
>is fine, and it works. However I need to specify the parameters, and
>thats when it fails
>
> """\\servername\software share\client\setup.exe -s -d
>\\\servername.."""
>doesn't work.

You should be able to replace the space with a %20 and still have it
function correctly with a share, folder or filename with a space. But
I think you're still having quote issues. The \\servername\share
name\client\setup.exe needs to be quoted as well, I think.

Jeff

Spaces and parameters query for VB Script by Bryan

Bryan
Thu Oct 23 16:02:21 CDT 2003

If you have not solved your problem, and cannot master the
syntax for using spaces in directory names, you might fall
back on the 'ShortName' property of the File or Folder
object under FSO. It gives you the old DOS 8.3 version of
the directory with no spaces. Safe for RUNNING or
REFERENCING things but if you store items using this
property you might lose the long filename access.

Given I would consider this a last resort; I hate falling
back on old technology when it could lose me something.
good luck.
BK

>-----Original Message-----
>Hi all -
>
> I need to run an application off a shared network
drive. I am
>having problems with writing the script that will access
the network
>drive (since I need to specify parameters and the network
drive name
>has a space in it). I have no problems running it off the
command
>line, but with the spaces and quotes in VBScript, things
get messed
>up.
>
>I need to run this line with VB Script, anyone with any
ideas ?
>(All on one line)
>
>\\Software share\Clients\W32Intel\Setup.exe -s -f1
>\\Software share\Clients\W32Intel\setup.iss"
>
>I'm looking for something like this :
>set ws = wscript.createobject("wscript.shell")
>ws.run("\\Software share\Clients\W32Intel\Setup.exe -s -
f1 ... etc")
>
>I have tried several combinations of """, "", and " with
no luck :-)
>
>Thanks for your help.
>.
>

Re: Spaces and parameters query for VB Script by Torgeir

Torgeir
Thu Oct 23 16:16:13 CDT 2003

jonathan fernandes wrote:

> 1. When it works, a quiet installation takes place. I have been able
> to do this using a shortcut to the network share and in the Target
> section of the shortcut, I have :
>
> "\\servername\Software share\LotusNotes\Clients\W32Intel\Setup.exe"
> -s -f1 "\\servername\Software
> share\LotusNotes\Clients\W32Intel\setup.iss"
>
> and this works fine. (These are just arguments for install shield for
> a quiet installation)

This should do exactly the same:

set ws = wscript.createobject("wscript.shell")

cmd = """\\servername\Software share\LotusNotes\Clients\W32Intel\Setup.exe"""_
& " -s -f1 " _
& """\\servername\Software share\LotusNotes\Clients\W32Intel\setup.iss"""

' to see the result before running it
WScript.Echo cmd

ws.run(cmd)


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting
Guide: http://www.microsoft.com/technet/scriptcenter



Re: Spaces and parameters query for VB Script by jonfernandes

jonfernandes
Mon Oct 27 03:01:06 CST 2003

Thanks all for your help. Torgeir many thanks for your solution. It
fixed my problem.


jonathan

> This should do exactly the same:
>
> set ws = wscript.createobject("wscript.shell")
>
> cmd = """\\servername\Software share\LotusNotes\Clients\W32Intel\Setup.exe"""_
> & " -s -f1 " _
> & """\\servername\Software share\LotusNotes\Clients\W32Intel\setup.iss"""
>
> ' to see the result before running it
> WScript.Echo cmd
>
> ws.run(cmd)