Powershell creates shortcut for every exe in folder

So i have a script to create a shortcut onto the desktop but i just found out that i need it to create shortcuts for multiple .exe's in a folder and for the life of me i can't figure out how to do this. below is what i have .Powershell$TargetFile = "c:\shared\*.exe"$ShortcutFile = "$env:homedrive\Desktop\test\*.lnk"$WScriptShell = New-Object -ComObject WScript.Shell$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)$Shortcut.TargetPath = $TargetFile$Shortcut.Save()Powershell$TargetFile = "c:\shared\*.exe"$ShortcutFile = "$env:homedrive\Desktop\test\*.lnk"$WScriptShell = New-Object -ComObject WScript.Shell$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)$Shortcut.TargetPath = $TargetFile$Shortcut.Save()

1. what is a transient variable?A transient variable is a variable that whose value is not going to be serialized2. What is synchronization?With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources.Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. This often leads to significant errors.3. What’s new with the stop(), suspend() and resume() methods in JDK 1.2?The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.4. Is null a keyword?"null" is not a keyword. .null is a literal.5. What state does a thread enter when it terminates its processing?When a thread terminates its processing, it enters the dead state.....Read More
Read More

Similar Messages

  • Create ShortCut  For Query Layout Design

    Hi All !!!
    I Designed a Report By Query Layout Design , so I want to Create ShortCut for it  , Because . If  I want to use This Report , I will do a lot Step .
    Please Help me.
    Thank alot .

    There is no specific SDK function for this, you could however write code to automate the manual steps:-
    - Launch Query Manager (ActivateMenuItem 4865)
    - Iterate through query groups in Item "6", and expand the group containing your query
    - Iterate through queries within the group, and use click method to highlight the required query
    - Call Print or Print Preview (ActivateMenuItem 520 / 519)
    John.

  • How to creat shortcut for ethernet on desktop in win 8

    how to create shortcut for Ethernet enable and disable
    because i have internet connected with LAN
    and it is has no internet disconnection option

    Hi,
    Here is the command you can write to the batch:
    To disable the interface, you'd then run:
    netsh interface set interface name="Local Area Connection” admin=DISABLED
    To enable the interface, you'd then run:
    netsh interface set interface name=“Local Area Connection” admin=ENABLED
    Note to find your  network interface, you can run
    netsh interface show interface command.
    Thanks!
    Andy Altmann
    TechNet Community Support

  • I create shortcut for user to get a cr but not working

    1. added report to Customer service folder
    2. created shortcut in closure group, which is attached to Customer service.
    the new report is not appearing when I login as that user. why? I can see the report shortcut when viewing in CMC but not when actual  logging in.

    Please allow me to re-phrase your question,
    1. Created a Report in Folder X
    2. Created a shortcut for the above report and placed in Folder Y
    User in Group A can view the report in Folder X but can't see the the shortcut in Folder Y, is that right?
    Or
    User in Group A can view the shortcut in Folder Y from CMC but not from BI Launchpad?

  • Is it possible to create shortcuts for Faces in iPhoto or Aperture?

    I am naming hundreds of faces.
    The auto detect function has exhausted all its options, so am now doing the remainder manually.
    Is it possible to create a shortcut for: 1) add a face? 2) specific names of faces?
    As am I doing hundreds its quite a laborious task.
    Thank you

    No.  The max no. of months you can create a calendar with is 24.  You might try using iCal.  It's perpetual.
    OT

  • Create shortcuts for different iTunes libraries?

    My wife and I share a single Windows 7 User account but have separate iTunes libraries.  It can be a hassle holding the shift button to bring up the option to switch between the libraries. Is there was a way to create a shortcut for each so I can just click on one to open my library and she can click on another for hers? Is that possible?

    "Should iTunes be separately D/L'ed and installed on each account?"
    No. You can create different users or put all the music together in one library and sync by playlists.
    "Can you Home Share from one library to another on the same machine?"
    No. http://support.apple.com/kb/HT1203

  • System creates group for every share point

    Every time I create a new share point on my OS X Server 10.5, a group is created by the system on the fly along with it.
    For example, I created a folder nameded Research Office and shared in Server Admin. Then when I assign the permission for the share point in Server Admin, I see a group called Research Office group with a GID of 124. However, this group does not appear in Workgroup Manager so I can not assign members to it.
    Anyone see this before?

    These groups are 'local' (Not LDAP) I still have difficulty wrapping my head around some of the rules about the 'how' this works but assigning LDAP users to this group does work!
    OK _To see this group(s)_.
    1: Open Workgroup Manager.app.
    2: Select /Local/Default in your Authentication list (this spot is between the Toolbar and the 4 (or 5) icons for User, Groups, Computer Groups etc.) We are looking for the place that should say something like 'Authenticated as XXXXX to local directory /Local/Default')
    3: Select the Groups icon (3 Shadows standing together)
    4: Select Menu View, Show System Users and Groups
    5: Now you will be able to select these groups.
    _To add LDAP users and groups to this 'local' group._
    1: Highlight the group in question
    2: Select the Members tab in the right pane
    3:Click the plus
    4: After the tray slides out, at the top of the tray, you will see a disclosure arrow and Local Directory /Local/Default. Click on it and select /LDAP/127.0.0.1
    Now you can select your LDAP users to assign rights.
    Peter

  • Setting up Organizer so it doesn't automatically create file for every document scanned

    How do I stop PSE Organizer from automatically creating a file folder and storing it in My Pictures every time I scan a document?

    Please repost in the Photoshop Elements forum.

  • Difference between saplogon.8sl vs Shortcut for saplogon.exe

    I am building SAPGui install pckage using Installation server. After package installation on a test machine, I am having trouble launching SAP Logon through SapLogon.8sl (SAL shortcut). I have created a shortcut pointing directly to saplogon.exe which works fine.
    My question is what is the difference between launching SAPLogon from SAL short (.8sl) vs manual shortcut (.lnk).
    We want to roll out this package to several users, but not sure if I am missing anything by not using SAL shortcut.
    Also, can someone let me know how to fix my original problem? When I click on SAL shortcut, it gives below error :
    Error starting 'C:\Program Files\SAP\FrontEnd\SAPgui\saplogon.exe' (rc=-2)
    TIA

    the S8L file is a text file which contains information so that it can automatically update its installation with a server.
    if you do not plan on automatically updating, you can use either (S8L or EXE)

  • Shortcut for deleting contents of folder?

    Anyone know of a shortcut to delete contents of a folder without deleting the folder itself? I would like to select multiple folders and trash the contents, but keep the folders and names intact.

    Well, I am not very experienced in this area, but if I were in your place I would see whether I could use Automator (or Applescript, for that matter) to perform this task. It sure seems like Automator should be able to do this without too much trouble. Of course, depending upon your experience, it may take longer to figure out how to make the workflow in Automator (or write the Applescript) than to do the whole thing manually. It is possible, I guess, that someone has already constructed such a thing and you could find it with an internet search.
    charlie

  • Create Shortcut for Right-Click Menu

    I know you can create shorcuts from System Pref. - Keyboard - Keyboard shortcuts.
    But this only works with commands that are on the menu bar, but not with menu that only appears when you click the right button of the mouse (or two finger tapping on trackpad)
    I'd like to know if there is any way to make a shortcut (like apple + D or sth) for the mouse menu. I suppose Automator can give us some way to work it out?
    Thanks

  • Is there any way to create a bookmark in safari that automatically creates itself for every user/account that logs into the computer?

    I am currently trying to add in a bookmark to Safari that will be automatically created on every account on the Mac.
    Is that possible? Or is the only way to do such a thing, to have to add it to each and every Safari on each individual account?

    HawkStreet wrote:
    I am currently trying to add in a bookmark to Safari that will be automatically created on every account on the Mac.
    Is that possible?
    No, unfortunately.
    Or is the only way to do such a thing, to have to add it to each and every Safari on each individual account?
    Yes.

  • How to create shortcut for CC11 Expression

    Hey guys! How do you create a keyboard shortcut to get CC11 Expression in the hyperdraw window of the piano roll?
    Under keycommand I could only find Velocity.
    thanks!
    oh btw, I'm still running Logic 8

    OK, just go to the Hyper editor, go hyper/create hyper set.
    It'll probable create a volume CC7 hyper set, select the hyper set you've just created by clicking on the name in the hyper editor, a set of parameters will appear to the left, then just change the number to 11 as in this pic:

  • Is it possible to create shortcuts for iTunes that work no matter what program I am in?

    My keyboard doesn't have media shortcuts. I want to create the media shortcuts using my F keys. How would I go about doing this so that no matter what program I am in, the shortcut speaks to iTunes?

    This is probably occuring because your Mac is attempting to wirelessly sync with a device. Try unchecking the checkbox that reads "Open iTunes when device is connected" (this option can be found under the general page of iTunes when you have a device connected).

  • Create shortcuts for a bluetooth keyboard. iOS.

    Hi guys.
    I have a custom bluetooth keyboard. What i need is to process specific function keys of the keyboard.
    I googled, but i have failed to find any solution. I can not find any info about how to process a keyboard's event. I can see only methods which allow to read a text string.
    Is this possible at all?

    Try resetting PRAM.
    Reset PRAM.   http://support.apple.com/kb/PH18761

Maybe you are looking for

  • Can I install Windows 7 from an SD card on my 2011 Macbook Air 13"?

    This morning I purchased a digital copy of Windows 7 from Microsoft, and created a bootable SD card for installing the operating system.  My problem is that Boot Camp Assistant will not allow me to partition the drive without the install media presen

  • How do I turn off the Camera access from the lock screen

    how do I turn off the Camera access from the lock screen ?

  • Join on Internal tables

    Hello ppl, I have 2 internal tables. I want to write a select query to select 2 fields from one internal table and 1 field from another internal table. These 3 fields will be selected in a third internal table. Fields to be selected: gt_mast-matnr   

  • Urgent!!!! EDI- Invoice Verification - MRHR( INVL ) - IDOC_INPUT_INVOIC_MRM

    Hi all,        I'm facing an error while uploading a EDI format flat file into SAP. An Idoc gets generated and the status error message number is <b>51 :</b> and it tells that <b>IDOC_INPUT_INVOIC_MRM NOT ALLOWED.</b> <b>The Basic Type is INVOIC02 Th

  • Anti virus on SAP system

    Hi Guys,              IS it possiable to install any Anti Virus software on an up and running SAPsystem.. if possiable what r the thing that i have to do for it??