Question
Windows Start menu issue
I'm trying to solve a problem with my install script.
Instead of cluttering the user's desktop with shortcuts I move a whole folder structure of shortcuts to the windows start menu folder.
1. rem ** Move shortcuts to the Windows Start menu
2. echo d|xcopy "C:\ptc\startup_scripts_3\Creo 3 Software" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Creo 3 Software" /y /r /s /e
My issue is most of the time it doesn't do it.
If I open up a command shell the command works.
Here's what I know about Windows 7:
1. In Windows 7 elevated and non-elevated accounts are not linked, so they don't share the same drive mappings. Consequently a script you start using "Run as administrator", will not see mapped drives.
2. Also an account in the Administrators group still runs everything not explicitly elevated as a limited user. So if you open a command shell while logged in as an admin, it will not run with elevated permission.
3. The only user that has full amin rights is the Administrator account, which runs everything elevated. Normally this account is disabled.
This means that if you use "run as admin" to start a batch file or open a command shell, that process will not be able to access any network shares. But, if you just open a command shell, or run a batch file, that process will not have elevated privileges.
The Windows start menu is here:
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\"
Surprisingly, moving files into this location requires elevated permissions. So, if you don't run the batch file using "Run as administrator", the script will not place the required files in the start menu.
My issue is the Run as Administrator trick was working... now it's not.
If I run the command interactively in a command shell it works. If I run it as a batch file it doesn't work even if I use "Run as Administrator"
Anyone know how to make this work consistantly? Or, how to open up the permissions to the start menu folder so a normal human can put files in there using a batch file?
David Haigh
Phone: 925-424-3931
Fax: 925-423-7496
Lawrence Livermore National Lab
7000 East Ave, L-362
Livermore, CA 94550
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Instead of cluttering the user's desktop with shortcuts I move a whole folder structure of shortcuts to the windows start menu folder.
1. rem ** Move shortcuts to the Windows Start menu
2. echo d|xcopy "C:\ptc\startup_scripts_3\Creo 3 Software" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Creo 3 Software" /y /r /s /e
My issue is most of the time it doesn't do it.
If I open up a command shell the command works.
Here's what I know about Windows 7:
1. In Windows 7 elevated and non-elevated accounts are not linked, so they don't share the same drive mappings. Consequently a script you start using "Run as administrator", will not see mapped drives.
2. Also an account in the Administrators group still runs everything not explicitly elevated as a limited user. So if you open a command shell while logged in as an admin, it will not run with elevated permission.
3. The only user that has full amin rights is the Administrator account, which runs everything elevated. Normally this account is disabled.
This means that if you use "run as admin" to start a batch file or open a command shell, that process will not be able to access any network shares. But, if you just open a command shell, or run a batch file, that process will not have elevated privileges.
The Windows start menu is here:
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\"
Surprisingly, moving files into this location requires elevated permissions. So, if you don't run the batch file using "Run as administrator", the script will not place the required files in the start menu.
My issue is the Run as Administrator trick was working... now it's not.
If I run the command interactively in a command shell it works. If I run it as a batch file it doesn't work even if I use "Run as Administrator"
Anyone know how to make this work consistantly? Or, how to open up the permissions to the start menu folder so a normal human can put files in there using a batch file?
David Haigh
Phone: 925-424-3931
Fax: 925-423-7496
Lawrence Livermore National Lab
7000 East Ave, L-362
Livermore, CA 94550
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

