查看完整版本: [轉貼]How to Create a Elevated Program Shortcut a Run in Windows 7

chun 2012-10-16 14:01

[轉貼]How to Create a Elevated Program Shortcut a Run in Windows 7

<a href="http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html">http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html</a><div><br></div><div><div style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); width: 784px; "><div style="padding: 4px; background-color: rgb(245, 255, 250); border-width: 0px 1px 1px 4px; border-color: rgb(163, 191, 177); border-style: solid; margin: 0px auto 8px; ">This will show you the administrator how to create a&nbsp;<b>elevated program shortcut</b>&nbsp;that allows a&nbsp;<b>standard user</b>&nbsp;or any user account to be able to run a program that&nbsp;<a href="http://www.sevenforums.com/tutorials/11841-run-administrator.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>runs as administrator</u></b></a>&nbsp;without being prompted to enter the<b>administator's password</b>&nbsp;each time in Windows 7.<br><br></div></div><div style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); width: 784px; "><div style="font-style: italic; color: rgb(0, 0, 102); font-weight: bold; padding: 5px; background-color: rgb(206, 223, 242); border-width: 1px 1px 0px 4px; border-color: rgb(99, 140, 156); border-style: solid; "><img class="inlineimg" src="http://www.sevenforums.com/images/notesmall1.png" width="20" height="16" border="0" alt="Note" title="Note" style="vertical-align: middle; ">&nbsp;&nbsp; Note</div><div style="padding: 4px; background-color: rgb(245, 250, 255); border-width: 0px 1px 1px 4px; border-color: rgb(99, 140, 156); border-style: solid; margin: 0px auto 8px; ">Thank you to our member&nbsp;<b>Onikuro</b>&nbsp;for pointing out this option in his post&nbsp;<a href="http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create-post1630072.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>here</u></b></a>.<br><br></div></div><div style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); width: 784px; "><div style="font-style: italic; color: black; font-weight: bold; padding: 5px; background-color: rgb(255, 198, 198); border-width: 1px 1px 0px 4px; border-color: rgb(153, 0, 0); border-style: solid; "><img src="http://www.sevenforums.com/images/warnsmall.png" width="20" height="20" border="0" alt="warning" title="warning" style="vertical-align: middle; ">&nbsp;&nbsp; Warning</div><div style="padding: 4px; background-color: rgb(254, 235, 239); border-width: 0px 1px 1px 4px; border-color: rgb(153, 0, 0); border-style: solid; margin: 0px auto 8px; ">You will not be able to do this in Windows 7&nbsp;<b>Home Basic</b>&nbsp;and&nbsp;<b>Starter</b>&nbsp;editions since they do not support the<b>runas&nbsp;<font color="red">/savecred</font></b>&nbsp;switch option.<br><br></div></div><br style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><br style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><br style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><b style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><font size="6"><font color="green">Here's How:</font></font></b><blockquote style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><b><font size="3">1.</font></b>&nbsp;If you have not already,&nbsp;<a href="http://www.sevenforums.com/tutorials/507-built-administrator-account-enable-disable.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>enable the built-in "Administrator" account</u></b></a>, and&nbsp;<a href="http://www.sevenforums.com/tutorials/288-password-create-user-account.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>create a password</u></b></a>&nbsp;for it.<br><b><font color="red">NOTE:</font></b>&nbsp;<i>You must use the actual built-in Adminstrator account, and not just another administrator type user account. If you don't the shortcut will now work</i>.<br><br><b><font size="3">2.</font></b>&nbsp;Log in to the built-in Administrator account, right click on a empty space on the desktop, and click on<b>New</b>&nbsp;and&nbsp;<b>Shortcut</b>.<br><br><b><font size="3">3.</font></b>&nbsp;Type the location below into the location area, and click on the&nbsp;<b>Next</b>&nbsp;button. (see screenshot below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180820d1319568162-elevated-program-shortcut-create-standard-user-step1.jpg" rel="Lightbox_1630238" id="attachment180820" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180820d1319568162t-elevated-program-shortcut-create-standard-user-step1.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step1.jpg" title="Elevated Program Shortcut - Create for Standard User-step1.jpg" style="margin: 2px; "></a><br></blockquote><div style="width: 704px; "><div style="font-style: italic; color: rgb(0, 0, 102); font-weight: bold; padding: 5px; background-color: rgb(206, 223, 242); border-width: 1px 1px 0px 4px; border-color: rgb(99, 140, 156); border-style: solid; "><img class="inlineimg" src="http://www.sevenforums.com/images/notesmall1.png" width="20" height="16" border="0" alt="Note" title="Note" style="vertical-align: middle; ">&nbsp;&nbsp; Note</div><div style="padding: 4px; background-color: rgb(245, 250, 255); border-width: 0px 1px 1px 4px; border-color: rgb(99, 140, 156); border-style: solid; margin: 0px auto 8px; "><ul><li style="font-size: 10pt; ">You would substitute&nbsp;<b><font color="red">ComputerName</font></b>&nbsp;in the command below with the actual&nbsp;<a href="http://www.sevenforums.com/tutorials/51293-computer-name-view-change.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>computer name</u></b></a>.</li><li style="font-size: 10pt; ">If the Administrator account has been&nbsp;<a href="http://www.sevenforums.com/tutorials/7417-built-administrator-account-change-name.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>renamed</u></b></a>, then you would also need to substitute<b>Administrator</b>&nbsp;in the command below with the new name.</li><li style="font-size: 10pt; ">You would substitute&nbsp;<b><font color="red">Full path to program's exe file</font></b>&nbsp;in the command below with the actual full path of the elevated program's exe file within quotes that you want to have the standard user be able to run.</li></ul></div></div><br><div style="margin: 5px 20px 20px; "><div class="smallfont" style="font-size: 11px; margin-bottom: 2px; ">Code:</div><pre class="alt2" dir="ltr" style="background-color: rgb(237, 246, 253); margin-top: 0px; margin-bottom: 0px; padding: 6px; border: 1px inset; width: 650px; height: 34px; text-align: left; overflow: auto; ">runas /user:<b><font color="red">ComputerName</font></b>\<b>Administrator</b> /savecred "<b><font color="red">Full path to program's exe file</font></b>"</pre></div><blockquote><b>For example:</b>&nbsp;I would like to have a standard user to be able to run CCleaner without me or them having to enter the Administrator's account password each time. For this, I would type this:<br></blockquote><div style="margin: 5px 20px 20px; "><div class="smallfont" style="font-size: 11px; margin-bottom: 2px; ">Code:</div><pre class="alt2" dir="ltr" style="background-color: rgb(237, 246, 253); margin-top: 0px; margin-bottom: 0px; padding: 6px; border: 1px inset; width: 650px; height: 34px; text-align: left; overflow: auto; ">runas /user:<b><font color="red">Brink-PC</font></b>\<b>Administrator</b> /savecred "<b><font color="red">C:\Program Files\CCleaner\CCleaner.exe</font></b>"</pre></div><br><b><font size="3">3.</font></b>&nbsp;Type in the name of the program (ex: CCleaner), and click on the&nbsp;<b>Finish</b>&nbsp;button. (see screenshot below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180821d1319568162-elevated-program-shortcut-create-standard-user-step2.jpg" rel="Lightbox_1630238" id="attachment180821" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180821d1319568162t-elevated-program-shortcut-create-standard-user-step2.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step2.jpg" title="Elevated Program Shortcut - Create for Standard User-step2.jpg" style="margin: 2px; "></a><br></blockquote><b><font size="3">4.</font></b>&nbsp;Right click on the new shortcut, click on&nbsp;<b>Properties</b>,&nbsp;<b>Shortcut&nbsp;</b>tab, and on the&nbsp;<b>Change Icon</b>&nbsp;button. (see screenshot below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180822d1319568162-elevated-program-shortcut-create-standard-user-step3.jpg" rel="Lightbox_1630238" id="attachment180822" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180822d1319568162t-elevated-program-shortcut-create-standard-user-step3.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step3.jpg" title="Elevated Program Shortcut - Create for Standard User-step3.jpg" style="margin: 2px; "></a><br></blockquote><b><font size="3">5.</font></b>&nbsp;Click on&nbsp;<b>OK</b>. (see screenshot below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180823d1319568162-elevated-program-shortcut-create-standard-user-step4.jpg" rel="Lightbox_1630238" id="attachment180823" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180823d1319568162t-elevated-program-shortcut-create-standard-user-step4.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step4.jpg" title="Elevated Program Shortcut - Create for Standard User-step4.jpg" style="margin: 2px; "></a><br></blockquote><b><font size="3">6.</font></b>&nbsp;Click on the&nbsp;<b>Browse</b>&nbsp;button, navigate to the location of the program's (ex: CCleaner) exe file, click on<b>Open</b>, select the program's icon, and click on&nbsp;<b>OK</b>. (see screenshots below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180824d1319568162-elevated-program-shortcut-create-standard-user-step5a.jpg" rel="Lightbox_1630238" id="attachment180824" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180824d1319568162t-elevated-program-shortcut-create-standard-user-step5a.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step5a.jpg" title="Elevated Program Shortcut - Create for Standard User-step5a.jpg" style="margin: 2px; "></a><a href="http://www.sevenforums.com/attachments/tutorials/180825d1319568171-elevated-program-shortcut-create-standard-user-step5b.jpg" rel="Lightbox_1630238" id="attachment180825" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180825d1319568171t-elevated-program-shortcut-create-standard-user-step5b.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step5b.jpg" title="Elevated Program Shortcut - Create for Standard User-step5b.jpg" style="margin: 2px; "></a><br></blockquote></blockquote><blockquote style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><b><font size="3">7.</font></b>&nbsp;Click on&nbsp;<b>OK</b>. (see screenshot below)<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/180826d1319568171-elevated-program-shortcut-create-standard-user-step6.jpg" rel="Lightbox_1630238" id="attachment180826" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/180826d1319568171t-elevated-program-shortcut-create-standard-user-step6.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step6.jpg" title="Elevated Program Shortcut - Create for Standard User-step6.jpg" style="margin: 2px; "></a><br></blockquote><b><font size="3">8.</font></b>&nbsp;Make copies of the shortcut to the&nbsp;<b>desktop</b>&nbsp;of any user account(s) (ex: standard user) that you would like to be able to run this elevated program without getting a UAC prompt or having to provide the administrator's password for it.<br><br><b><font size="3">9.</font></b>&nbsp;Log on to any user account that you made a copy of this shortcut to, and run the shortcut.&nbsp;<br><br><b><font size="3">10.</font></b>&nbsp;In the command prompt that opened, type in your&nbsp;<b>built-in</b>&nbsp;<b>Administrator</b>&nbsp;account's password and press Enter. You will not see the password while you are typing it in. (see screenshot below)<br><b><font color="red">NOTE:</font></b>&nbsp;<i>You will only have to enter the Administrator's password for only the first time that this shortcut is ran in a user's account. Afterwards, it will be remembered and entered automatically for the user when they run it without anyone being able to see the password</i>.<blockquote><a href="http://www.sevenforums.com/attachments/tutorials/184100d1321557987-elevated-program-shortcut-create-standard-user-step7.jpg" rel="Lightbox_1630238" id="attachment184100" style="color: rgb(52, 133, 189); text-decoration: none; "><img src="http://www.sevenforums.com/attachments/tutorials/184100d1321557987t-elevated-program-shortcut-create-standard-user-step7.jpg" class="thumbnail" border="0" alt="Elevated Program Shortcut - Create for Standard User-step7.jpg" title="Elevated Program Shortcut - Create for Standard User-step7.jpg" style="margin: 2px; "></a><br></blockquote></blockquote><blockquote style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><b><font size="3">11.</font></b>&nbsp;The user can now&nbsp;<a href="http://www.sevenforums.com/tutorials/397-taskbar-pin-unpin-program-links.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>Pin to Taskbar</u></b></a>&nbsp;or&nbsp;<a href="http://www.sevenforums.com/tutorials/744-start-menu-pin-unpin-program.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>Pin to Start Menu</u></b></a>&nbsp;this shortcut,&nbsp;<a href="http://www.vistax64.com/tutorials/74063-keyboard-shortcut.html" target="_blank" style="color: rgb(52, 133, 189); text-decoration: none; "><b><u>assign a keyboard shortcut</u></b></a>to it, or move it where they like for easy use in their user account.<br></blockquote><span style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); ">That's it,</span><br style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); "><span style="color: rgb(50, 50, 50); font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; text-align: justify; background-color: rgb(246, 250, 251); ">Shawn</span></div>

chun 2012-10-16 14:09

other

<p style="border: none; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin-top: 1em; margin-bottom: 1em; outline: 0px; list-style-type: none; color: rgb(51, 51, 51); font-size: 13px; line-height: 16px; ">Hi ScottDarth,</p><p style="border: none; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin-top: 1em; margin-bottom: 1em; outline: 0px; list-style-type: none; color: rgb(51, 51, 51); font-size: 13px; line-height: 16px; ">I've seen something similar, basically taskscheduler assumes that the applicaiton is 64 bit. If it is 32 bit then try launching it from the 32 bit command line, i.e. if you want to run c:\program files (x86)\Myprogram\Program.exe, tell taskscheduler to launch:</p><p style="border: none; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin-top: 1em; margin-bottom: 1em; outline: 0px; list-style-type: none; color: rgb(51, 51, 51); font-size: 13px; line-height: 16px; ">%systemroot%\Syswow64\cmd.exe /C "c:\program files (x86)\Myprogram\Program.exe"<br><br>This forces it to launch from the 32 bit command-prompt and hence with 32 bit emulation.</p><p style="border: none; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; margin-top: 1em; margin-bottom: 1em; outline: 0px; list-style-type: none; color: rgb(51, 51, 51); font-size: 13px; line-height: 16px; ">Regards,</p>
頁: [1]
查看完整版本: [轉貼]How to Create a Elevated Program Shortcut a Run in Windows 7