Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
kenA
Post
by kenA » Mon Jun 30, 2003 4:03 pm
I want to create a macro I can distribute to users that will place a copy of a file on out on our network to their desktop in Win 2000. My code is this...
Let>filename=k:\myFolder\dbForms.mdb
Let>newfilename=C:\Documents and Settings\ken\desktop\dbForms.mdb
CopyFile>filename,newfilename
MessageModal>File's Done!
The code above works fine on my PC but is there a generic way to copy it to any user's desktop without knowing the user's name? Something like %DESKTOP% or something?
Thanks in advance...
Ken
-
Lumumba
Post
by Lumumba » Tue Jul 01, 2003 5:23 am
Use this to set it only for the current user:
C:\WINNT\Profiles\Default User\Desktop\
or if it should be available for all users who share this PC, use the generic path:
C:\WINNT\Profiles\All Users\Desktop
Check the path based on your OS!
---
Use the commandline:
cmd /k set and you'll get some system variables listed eg.
USERNAME=JohnDoe
USERPROFILE=C:\WINNT\Profiles\JohnDoe
cause MSched has an equivalent for USERNAME --> USER_NAME included, you can build your own "USERPROFILE"- system variable. So you can modify the Startmenu as well. eg.
Code: Select all
CopyFile>C:\WINNT\Profiles\%USER_NAME%\Start Menu\Programs\dbForms.mdb
-
Dave1
Post
by Dave1 » Mon Aug 11, 2003 1:28 am
I could not get this to work in an XP environment.
CopyFile>k:\myFolder\dbForms.mdb,"C:\Documents and Settings\All Users\Desktop\"
Is it due to the special security setting of XP? And how can we work around it?
Thanks
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Mon Aug 11, 2003 4:28 am

Have you tried adding the filename to the destination?
Like this:
CopyFile>k:\myFolder\dbForms.mdb,"C:\Documents and Settings\All Users\Desktop\dbForms.mdb"
Hope this helps..............good luck,
Bob
-
Guest
Post
by Guest » Mon Aug 11, 2003 9:12 am
Hi Bob,
Yes, of course I tried that and I also checked to make sure that the desktop folder has the 'security' tab set to 'full control', but nothing worked.
I posted the problem in a couple of times hoping that SUPPORT would look into the issue.
Thanks for responding.
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Tue Aug 12, 2003 4:21 am
I just ran the following line with no problem:
CopyFile>c:\autoexec.bat,\\XP_19\DRIVE_C (C)\Documents and Settings\All Users\Desktop\autoexec.bat
This was from a 98SE machine to an XP Professional machine. I do not have a drive letter mapped so I used the UNC.
I realize that this is copy from a local machine to a remote machine, but I think that would actually have more security issues.

Hmmmm...I just noticed I did not use quotes around destination like you did.....be right back, will test with quotes......FAILED! Good news, that is the problem!
Bottom line result: Remove the quotes arouond the destination. Works OK for me. (Macro Scheduler 7.2.037).
