Prev Previous Post   Next Post Next

Items in Startup folder don't start on bootup

Posted: 10-04-2006, 12:49 AM
Note: This is not an unattended install question. Please read the entire
message:

During unattended install, I add a command to the RunOnce (<CommandLine> in
unattend.xml):
CMD.EXE /C COPY C:\TOOLS\WinRun.bat
C:\Users\ADMINI~1\AppData\Roaming\MICROS~1\Windows \STARTM~1\Programs\Startup\WinRun.bat

This does not work. The batch file never gets copied. However I can run this
exact same command in the Start/Run box, and it copies just fine.

I also tried this command:
CMD.EXE /C COPY C:\TOOLS\WinRun.bat
C:\PROGRA~2\Microsoft\Windows\STARTM~1\Programs\St artup\WinRun.bat

This one works just fine. However, my VB6 program uses a built-in function
to obtain the Startup folder path:
strStartupFolder = objShell.SpecialFolders("Startup") & "\"

The path returned by objShell.SpecialFolders("Startup")in Vista is the
previous path that I was using initially (the one that does not work):
C:\Users\ADMINI~1\AppData\Roaming\MICROS~1\Windows \STARTM~1\Programs\Startup\

So when I try to delete the WinRun.bat file from the Startup folder
designated by the VB6 SpecialFolders command (so it doesn't run on every
reboot), the batch file doesn't get deleted, and it runs on every boot.

I guess I can hard-code the path for now, but I'd like a more reasonable
solution.

Thanks,
--
Bill Baker

Reply With Quote

Responses to "Items in Startup folder don't start on bootup"

 
LinkBack Thread Tools Display Modes
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Email - Cannot delete items from Deleted Items folder Rees2007 Windows Vista Mail 15 09-25-2007 12:32 PM
Some items in Start Menu > Accesories folder disappear. Please hel Goose II Windows Vista File Management 9 07-26-2007 05:59 PM
Startup Folder - Order In Which Programs Start DBavirsha Windows XP Configuration & Management 2 06-06-2006 04:43 PM
Expandable Folder Items in Pin area of Start Menu? Atreju Customize Windows XP 3 04-09-2004 04:09 PM
Folder locations of start menu items John down under Windows XP Setup 1 12-24-2003 03:07 AM