DavidDuanne Posted April 4, 2014 Posted April 4, 2014 I created a script that, along with other things, creates a shortcut on the desktop. The shortcut MUST be created in the "Public Desktop" folder on Windows 7 computers and the "All UsersDesktop" folder on XP computers. I need for all users to get the shortcut. Rather than using IF/THEN statements to figure out the OS version then copying the file to a different path based on the version, I attempted to use the @DesktopCommonDir macro; which is supposed to figure this out for me. The @DesktopCommonDir keeps returning an incorrect path on Windows 7 computers (only). XP was okay. I wrote a quick test script with the following line: msgbox(0,"title",@DesktopCommonDir) On a Windows 7 computer, the test script returns this path: "C:UsersPublicDesktop". Unfortunately, that is not the correct path. The correct path to the public desktop is "C:UsersPublicPublic Desktop". I've looked at 3 different Windows 7 computers to make sure. I also ran the test script on those computers. Each time, I get the incorrect path. Am I using the macro correctly? Or did I find a bug undocumented feature?
AdamUL Posted April 4, 2014 Posted April 4, 2014 The correct path is "C:UsersPublicDesktop" as @DesktopCommonDir is returning. To see the path, go the directory in Windows Explorer, and then click on the Address Bar. It will show the path as "C:UsersPublicDesktop". Adam
somdcomputerguy Posted April 4, 2014 Posted April 4, 2014 (edited) My (well, not mine actually, but the one I use) laptop is running Windows 7 HP, and this is what Explorer is showing me - http://prntscr.com/3713m5, exactly what is posted above. Edited April 4, 2014 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
JohnOne Posted April 4, 2014 Posted April 4, 2014 Same here, win 7 32. (C:UsersPublicDesktop) Sounds like a non standard installation or admin has changed it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Palestinian Posted April 5, 2014 Posted April 5, 2014 Win8 here and its returning the same/correct path, C:UsersPublicDesktop
KenE Posted February 23, 2015 Posted February 23, 2015 (edited) I realize that it has been some time since the op posted the original question, but it is generally a matter of needing administrative rights when the script is run. Standard users are stopped by a UAC prompt to create files in these locations, so your script will need to do the same. If it is a compiled script, right click and run as administrator, or add: #RequireAdmin. YMMV. This may have nothing at all to do with your issue. Edited February 23, 2015 by KenE
SadBunny Posted February 24, 2015 Posted February 24, 2015 (edited) I realize that it has been some time since the op posted the original question, but it is generally a matter of needing administrative rights when the script is run. Standard users are stopped by a UAC prompt to create files in these locations, so your script will need to do the same. If it is a compiled script, right click and run as administrator, or add: #RequireAdmin. YMMV. This may have nothing at all to do with your issue. Thanks for necromancing the thread OP wanted, or rather expected, a non-standard location returned from his for his public desktop ("C:UsersPublicPublic Desktop" instead of "C:UsersPublicDesktop"). Apparently his Windows was set to the default setting. It was probably a simple misunderstanding on OP's side. So it has indeed little or nothing to do with the OP's post... Also, OP posted a grand total of 1 messages on the forum, so the chances that he is still interested require at least a double precision float to express. Edited February 24, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now