Jump to content

[Solved] Trouble trying to move shortcut in Vista


Recommended Posts

I'm trying to make a script to cleanup the start menu, I have no problems with XP but in Vista it seems I can't get all of them to move.

; Windows Media Center
If Not FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
DirCreate(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center")
EndIf
If FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
FileMove(@ProgramsCommonDir & "\Windows Media Center.lnk", @ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center", 1)
EndIf

Using this script creates all of my folders and moves most but not all of my shortcuts. I'm using Vista 32-Bit SP1, Can Someone please help?

Edited by pcjames
Link to comment
Share on other sites

If this is the whole script (or at least most of it) then it's safe to assume that you're just move one file and not an entire directory. Can you explain a bit more?

No this is not the whole script, this is just one of the shortcuts that won't move, I have included the whole script and there's only a few that won't move like "Windows Meeting Space", "Windows Easy Transfer" and a few others although I have not fully went over the entire script, I can't get these two to work.

You have to turn off UAC first, then you can tweak the start menu.

Sorry I forgot to add that UAC is turned off!

The mostly complete script (I have not checked for all errors just the ones mentioned above)

VistaPremiumClassicStyleEssentials_Cleanup.au3

Link to comment
Share on other sites

Just a note. You don't need to add all these If...EndIf conditions. FileMove() and FileCopy() have another flag or option to build the directory structure of the destination if it does not exist. For example:

If FileExists(@ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player") Then
FileMove(@ProgramsDir & "\Windows Media Player.lnk", @ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player", 1)
EndIfoÝ÷ ÙƧmêÞ¸­µéÚ±«­¢+Ù¥±5½Ù¡AɽɵͥȵÀìÅÕ½ÐìÀäÈí]¥¹½ÝÌ5¥A±åȹ±¹¬ÅÕ½Ðì°AɽɵͥȵÀìÅÕ½ÐìÀäÈíÕ¥¼µÑµY¥¼ÀäÈí5¥A±åÉÌÀäÈí]¥¹½ÝÌ5¥A±åÈÅÕ½Ðì°Ä¬à¤ì=Èä¸

As for the main problem. Can you manually move these shortcuts?

Link to comment
Share on other sites

Just a note. You don't need to add all these If...EndIf conditions. FileMove() and FileCopy() have another flag or option to build the directory structure of the destination if it does not exist. For example:

If FileExists(@ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player") Then
FileMove(@ProgramsDir & "\Windows Media Player.lnk", @ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player", 1)
EndIf
Thanks, I'm kinda new so I read a lot and try to figure out things on my own without trying to bother folks on here. Also let me make sure I understand you correctly my original statement

If Not FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
DirCreate(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center")
EndIf
If FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
FileMove(@ProgramsCommonDir & "\Windows Media Center.lnk", @ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center", 1)
EndIf

can be reduced too

FileMove(@ProgramsDir & "\Windows Media Player.lnk", @ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player", 1+8)

As for the main problem. Can you manually move these shortcuts?

Yes I can manually move these shortcuts and my script does the exact same things on 2 Vista machines both are Vista Premium SP1 32-Bit w/UAC turned off.
Link to comment
Share on other sites

Thanks, I'm kinda new so I read a lot and try to figure out things on my own without trying to bother folks on here. Also let me make sure I understand you correctly my original statement

If Not FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
DirCreate(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center")
EndIf
If FileExists(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center") Then
FileMove(@ProgramsCommonDir & "\Windows Media Center.lnk", @ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center", 1)
EndIf

can be reduced too

FileMove(@ProgramsDir & "\Windows Media Player.lnk", @ProgramsDir & "\Audio-Data-Video\Media Players\Windows Media Player", 1+8)
Yes, it can be, hope I'm right. ;]

Yes I can manually move these shortcuts and my script does the exact same things on 2 Vista machines both are Vista Premium SP1 32-Bit w/UAC turned off.

If you don't mind, can you test if each file exists? Like:

ConsoleWrite(@ProgramsCommonDir & "\Windows Media Center.lnk" & @LF)oÝ÷ ØƲmë(ëax"²z-¸­µéÜ¢ºÞrÙrlGb·öå¢Xî²ÙèÁÆ­r­)^2Þßд÷d¨ëaxÅíýßд÷d¨ëax4÷d¨ëax6ßßb²z-­ʰj{H¶ÈhºW[y«­¢+Ù¥±5½Ù ÌäíèÀäÈíM½µÑ¡¥¹¹áÌäì°ÌäíèÀäÈíM½µÑ¡¥¹ÀäÈíͽµÑ¡¥¹¹áÌäì°ä¤ìà¤
Edited by Authenticity
Link to comment
Share on other sites

Sorry for double post, otherwise gibberish is gonna be posted.

You can just do this:

FileMove(@ProgramsCommonDir & "\Windows Media Center.lnk", @ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center\", 9) ; \ <-
Sorry for the delay, I'm on Satellite and it's been raining cats and dogs here, I tried the code above on both machines and still doesn't work!

ConsoleWrite(@ProgramsCommonDir & "\Windows Media Center.lnk" & @LF)

I put this in a script and ran it and nothing happened

I checked the properties on the link and it shows "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" which should be @ProgramsCommonDir so I don't know why it's not working.

BTW While waiting for my internet connection I tried your code (for my other links) and it works like a charm... Thanks Authenticity for the heads up!

Edited by pcjames
Link to comment
Share on other sites

Hello again lol ;]

Did you go through the process of checking if each file exists? I see you can get pretty fast confuse with @ProgramsDir and this stuff.

; ----------------------------------------------------------------------------
;
; Software:         Windows Vista Essentials Cleanup
; Version:          v05.09
; Date Modified:    05/22/09 
; Platform:         WinXP
; Author:           James Montgomery
;
; ----------------------------------------------------------------------------
#include <Array.au3>
Opt("TrayIconDebug", 1)

; ----------------------------------------------------------------------------
; Windows Vista Essentials Cleanup
; ----------------------------------------------------------------------------

; Character Map
Dim $aFiles = StringSplit(@ProgramsCommonDir & "\Accessories\System Tools\Character Map.lnk|" & _
              @ProgramsDir & "\Accessories\Command Prompt.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Connect to a Network Projector.lnk|" & _
              @ScriptDir & "\Icons\Date and Time.lnk|" & _
              @StartMenuCommonDir & "\Default Programs.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Disk Defragmenter.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Disk Cleanup.lnk|" & _
              @ScriptDir & "\Icons\Display.lnk|" & _
              @ProgramsDir & "\Accessories\Windows Explorer.lnk|" & _
              @ScriptDir & "\Icons\Folder Options.lnk|" & _
              @ScriptDir & "\Icons\Game Controllers.lnk|" & _
              @ScriptDir & "\Icons\Internet Options.lnk|" & _
              @ScriptDir & "\Icons\Java.lnk|" & _
              @ScriptDir & "\Icons\Keyboard.lnk|" & _
              @ScriptDir & "\Icons\Mouse.lnk|" & _
              @ScriptDir & "\Icons\Network and Sharing Center.lnk|" & _
              @ProgramsDir & "\Accessories\Notepad.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Paint.lnk|" & _
              @ScriptDir & "\Icons\Parental Controls.lnk|" & _
              @ScriptDir & "\Icons\Pen and Input Devices.lnk|" & _
              @ScriptDir & "\Icons\Performance Information and Tools.lnk|" & _
              @ScriptDir & "\Icons\Phone and Modem Options.lnk|" & _
              @ScriptDir & "\Icons\Power Options.lnk|" & _
              @ScriptDir & "\Icons\Problem Reports and Solutions.lnk|" & _
              @ScriptDir & "\Icons\Programs and Features.lnk|" & _
              @ScriptDir & "\Icons\Regional and Language Options.lnk|" & _
              @ScriptDir & "\Icons\Remote Desktop Connection.lnk|" & _
              @ProgramsDir & "\Accessories\Run.lnk|" & _
              @ScriptDir & "\Icons\Scanners and Cameras.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Security Center.lnk|" & _
              @ScriptDir & "\Icons\Set Program Access and Defaults.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Snipping Tool.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Sound Recorder.lnk|" & _
              @ScriptDir & "\Icons\Sounds and Audio Devices.lnk|" & _
              @ScriptDir & "\Icons\Speech Recognition Options.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Sync Center.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\System Information.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\System Restore.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Scheduled Tasks.lnk|" & _
              @ScriptDir & "\Icons\Taskbar and Start Menu.lnk|" & _
              @ScriptDir & "\Icons\Text to Speech.lnk|" & _
              @ScriptDir & "\Icons\User Accounts.lnk|" & _
              @ScriptDir & "\Icons\Volume Control.lnk|" & _
              @ScriptDir & "\Icons\Volume Control.lnk|" & _
              @ProgramsCommonDir & "\Windows Calendar.lnk|" & _
              @ProgramsCommonDir & "\Accessories\Calculator.lnk|" & _
              @ProgramsCommonDir & "\Windows Contacts.lnk|" & _
              @ProgramsCommonDir & "\Windows DVD Maker.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Windows Easy Transfer.lnk|" & _
              @ScriptDir & "\Icons\Windows Firewall.lnk|" & _
              @ProgramsCommonDir & "\Windows Mail.lnk|" & _
              @ProgramsCommonDir & "\Windows Media Center.lnk|" & _
              @ProgramsDir & "\Windows Media Player.lnk|" & _
              @ProgramsCommonDir & "\Windows Meeting Space.lnk|" & _
              @ProgramsCommonDir & "\Windows Movie Maker.lnk|" & _
              @ProgramsCommonDir & "\Windows Photo Gallery.lnk|" & _
              @ScriptDir & "\Icons\Windows Sidebar Properties.lnk|" & _
              @ScriptDir & "\Icons\Windows SideShow.lnk|" & _
              @StartMenuCommonDir & "\Windows Update.lnk|" & _
              @ProgramsCommonDir & "\Accessories\WordPad.lnk", '|')
              

_ArrayDisplay($aFiles)
ConsoleWrite(@LF & @LF)

For $i = 1 To $aFiles[0]
    If FileExists($aFiles[$i]) Then
        ConsoleWrite('+ ' & $aFiles[$i] & @LF)
    Else
        ConsoleWrite('! ' & $aFiles[$i] & @LF)
    EndIf
Next
Link to comment
Share on other sites

Hello again lol ;]

Did you go through the process of checking if each file exists? I see you can get pretty fast confuse with @ProgramsDir and this stuff.

If you see anything red in the console window, the file does not exist.

I ran the script and got Array: ListView Display showing 60 items and none of these are in "Red" there all in "Black"
Link to comment
Share on other sites

Here's what I got

>
"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "G:\Unattended Setup\Complete\Windows Cleanup\WinVista\test3.au3"  
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Character Map.lnk
+ C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Connect to a Network Projector.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Date and Time.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Default Programs.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Disk Defragmenter.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Disk Cleanup.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Display.lnk
+ C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Explorer.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Folder Options.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Game Controllers.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Internet Options.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Java.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Keyboard.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Mouse.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Network and Sharing Center.lnk
+ C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Parental Controls.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Pen and Input Devices.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Performance Information and Tools.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Phone and Modem Options.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Power Options.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Problem Reports and Solutions.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Programs and Features.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Regional and Language Options.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Remote Desktop Connection.lnk
+ C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Run.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Scanners and Cameras.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Security Center.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Set Program Access and Defaults.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Snipping Tool.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sound Recorder.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Sounds and Audio Devices.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Speech Recognition Options.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Sync Center.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\System Information.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\System Restore.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Scheduled Tasks.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Taskbar and Start Menu.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Text to Speech.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\User Accounts.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Volume Control.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Volume Control.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Calendar.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Calculator.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Contacts.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows DVD Maker.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Windows Easy Transfer.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Windows Firewall.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Mail.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Media Center.lnk
! C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows Media Player.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Meeting Space.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Movie Maker.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Photo Gallery.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Windows Sidebar Properties.lnk
+ G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Windows SideShow.lnk
! C:\ProgramData\Microsoft\Windows\Start Menu\Windows Update.lnk
+ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\WordPad.lnk
>Exit code: 0   Time: 67.541
Link to comment
Share on other sites

Your right some in the list does not exist because they have been moved already but here's the status of each

Link still exist in start menu in the location below and link works but didn't copy

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Connect to a Network Projector.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Default Programs.lnk

Link still exist in start menu in the location below and link works but didn't copy

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Disk Defragmenter.lnk

This one is default location for XP I don't believe it's the default location can't check until I get to office to look at another Vista machine

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Security Center.lnk

and I have corrected to

G:\Unattended Setup\Complete\Windows Cleanup\WinVista\Icons\Security Center.lnk

This one should of been

@ProgramsCommonDir & "\Accessories\System Tools\Task Scheduler.lnk|" & _

and not (my mistake in script)

@ProgramsCommonDir & "\Accessories\System Tools\Scheduled Tasks.lnk|" & _

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Calendar.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Contacts.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows DVD Maker.lnk

Link still exist in start menu in the location below and link works but didn't copy

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Windows Easy Transfer.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Mail.lnk

Link still exist in start menu in the location below and link works but didn't copy

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Media Center.lnk

Has already been moved by script

C:\Users\PCJames\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows Media Player.lnk

Link still exist in start menu in the location below and link works but didn't copy

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Meeting Space.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Movie Maker.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Photo Gallery.lnk

Has already been moved by script

C:\ProgramData\Microsoft\Windows\Start Menu\Windows Update.lnk

Link to comment
Share on other sites

Hey Authenticity I really do appreciate your help! I've shortened your script to just the ones I'm having problems with and I ran it on my other machine and got the same results (files aren't existing), so tomorrow (geesh it is tomorrow already) I have to go setup a brand new Vista machine (still in the box) and I'll run your script on it and post the results when I get back Sunday evening.

#include <Array.au3>
Opt("TrayIconDebug", 1)

Dim $aFiles = StringSplit(@ProgramsCommonDir & "\Accessories\Connect to a Network Projector.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Disk Defragmenter.lnk|" & _
              @ProgramsCommonDir & "\Accessories\System Tools\Windows Easy Transfer.lnk|" & _
              @ProgramsCommonDir & "\Windows Media Center.lnk|" & _
              @ProgramsCommonDir & "\Windows Meeting Space.lnk", '|')
              

_ArrayDisplay($aFiles)
ConsoleWrite(@LF & @LF)

For $i = 1 To $aFiles[0]
    If FileExists($aFiles[$i]) Then
        ConsoleWrite('+ ' & $aFiles[$i] & @LF)
    Else
        ConsoleWrite('! ' & $aFiles[$i] & @LF)
    EndIf
Next
Link to comment
Share on other sites

Ok Authenticity I ran the script today on a Brand New (straight out of the box) HP Pavilion M9600t Vista Premium 64-Bit machine with UAC turned off and the only thing I added was Autoit and just like on my machines the script said none of those links exist. So either it's something to do with Vista itself or maybe even a bug with vista and autoit? I don't know what machine your running but if XP try it out on a Vista machine and see if you get different results.

Edited by pcjames
Link to comment
Share on other sites

  • 4 weeks later...

Are you sure these files exist and that they are truly shortcuts? If they are not shortcut then their extension is not lnk, you can run another test to see their name as the system sees them using FileFindFirstFile() and FileFindNextFile() and output their names. There are no bugs in AutoIt FileMove() as far as I know, so if the files are not exist but you're sure they are there then they're probably not shortcut files.

Link to comment
Share on other sites

Let's use the "Windows Media Player" for an example. I can do a workaround to create the shortcut but then if I want to delete the original shortcut I still run into a problem... I can't get Autoit to delete it.

; Windows Media Center
    DirCreate(@ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center")
    FileCreateShortcut(@WindowsDir & "\ehome\ehshell.exe", @ProgramsCommonDir & "\Audio-Data-Video\Media Players\Windows Media Center\Windows Media Center.lnk", "", "", "", @WindowsDir & "\ehome\ehshell.exe", "", "-IDI_APP", @SW_SHOWNORMAL)
    FileDelete(@ProgramsCommonDir & "\Windows Media Center.lnk")

The results was "No files/directories matched the search pattern", I swear I'm not crazy... it's there... I'm including a screenshot of it's properties below! It says it's a shortcut, I just don't understand :D

properties.zip

Edited by pcjames
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...