Hi all

I am trying to copy a file to %USERPROFILE%\start Menu\programs\startup

but the script cannot accept the path. Is there a way round this without
knowing the actual path??

Thanks

Help on copying by Tom

Tom
Tue Sep 16 07:39:01 CDT 2003

With CreateObject("WScript.Shell")
sPath =.ExpandEnvironmentStrings("%UserProfile%" _
& "\Start Menu\Programs\Startup")
End with

WSH Documentaion at:

http://msdn.microsoft.com/library/en-
us/script56/html/wsoriWindowsScriptHost.asp

or download at:

http://www.microsoft.com/downloads/details.aspx?
FamilyId=01592C48-207D-4BE1-8A76-
1C4099D7BBB9&displaylang=en

The second one is very useful. Both URL's are single
lines that are wrapped in transit.

Tom Lavedas
===========

>-----Original Message-----
>Hi all
>
>I am trying to copy a file to %USERPROFILE%\start
Menu\programs\startup
>
>but the script cannot accept the path. Is there a way
round this without
>knowing the actual path??
>
>Thanks

>

Re: Help on copying by Bill

Bill
Tue Sep 16 07:41:50 CDT 2003

Since %userprofile% is usually in the "\Documents and Settings" folder, =
you are probably running into problems with spaces in the path. If that =
is the case you need to wrap the path in double quotes.

--=20

Bill James
Microsoft Shell/UI

Win9x VBScript Utilities =BB www.billsway.com/vbspage/
Windows Tweaks & Tips =BB www.billsway.com/notes_public/

"Paul McShane" <peemickuk@hotmail.com> wrote in message =
news:O3kLzcCfDHA.3528@tk2msftngp13.phx.gbl...
> Hi all
>=20
> I am trying to copy a file to %USERPROFILE%\start =
Menu\programs\startup
>=20
> but the script cannot accept the path. Is there a way round this =
without
> knowing the actual path??
>=20
> Thanks
>=20
>