Click here to Skip to main content
15,891,529 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: shape of number Pin
memas6316-Sep-12 7:00
memas6316-Sep-12 7:00 
GeneralRe: shape of number Pin
Wes Aday16-Sep-12 7:08
professionalWes Aday16-Sep-12 7:08 
GeneralRe: shape of number Pin
memas6316-Sep-12 7:13
memas6316-Sep-12 7:13 
GeneralRe: shape of number Pin
Wes Aday16-Sep-12 7:18
professionalWes Aday16-Sep-12 7:18 
GeneralRe: shape of number Pin
memas6316-Sep-12 7:19
memas6316-Sep-12 7:19 
GeneralRe: shape of number Pin
Steven St. John16-Sep-12 16:03
Steven St. John16-Sep-12 16:03 
GeneralRe: shape of number Pin
memas6317-Sep-12 0:42
memas6317-Sep-12 0:42 
QuestionI need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
WillB1215-Sep-12 22:45
WillB1215-Sep-12 22:45 
I've written an app in VB12, and if the user wants the app run from the Windows' Startup Folder, I'm trying to copy my executable from it's current residence to the Startup folder with

Environment.GetEnvironmentVariable("ALLUSERSPROFILE")
& "\Microsoft\Windows\Start Menu\Programs\Startup\"
& My.Settings.ExeName)

where ExeName is a static constant in the My Settings object.

This works to give me the a valid path string to "C:\ProgramData\"{et. al.} - but I get an Access Error (Error 5) when my app tries to do a

FileIO.FileSystem.CopyFile(strCurrentAppName, strDestinationFileName) where strDestinationFileName is a concatenation of

Environment.GetEnvironmentVariable("ALLUSERSPROFILE")
& "\Microsoft\Windows\Start Menu\Programs\Startup\" & My.Settings.ExeName

Can anyone give me a method that will work without User Rights Access business? I may try using "APPDATA" instead of "ALLUSERSPROFILE" in the interim.

Or if anyone has a better approach to getting an executable to run at Windows' Startup, I'm all ears...Cool | :cool:

modified 16-Sep-12 5:06am.

AnswerRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
Richard MacCutchan16-Sep-12 0:18
mveRichard MacCutchan16-Sep-12 0:18 
GeneralRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
WillB1216-Sep-12 0:39
WillB1216-Sep-12 0:39 
GeneralRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
Richard MacCutchan16-Sep-12 1:07
mveRichard MacCutchan16-Sep-12 1:07 
GeneralRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
WillB1216-Sep-12 3:23
WillB1216-Sep-12 3:23 
GeneralRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
Richard MacCutchan16-Sep-12 4:05
mveRichard MacCutchan16-Sep-12 4:05 
AnswerRe: I need to copy a file into (anyone's) Startup Folder w/ no Access errors... Pin
Dave Kreskowiak16-Sep-12 6:02
mveDave Kreskowiak16-Sep-12 6:02 
QuestionMicrosoft ReportViewer Pass By Parameter(WinForm) Pin
garyu8715-Sep-12 2:06
garyu8715-Sep-12 2:06 
AnswerRe: Microsoft ReportViewer Pass By Parameter(WinForm) Pin
garyu8715-Sep-12 4:02
garyu8715-Sep-12 4:02 
QuestionWhat Trace??? Pin
alirezamansoori14-Sep-12 5:20
alirezamansoori14-Sep-12 5:20 
AnswerRe: What Trace??? Pin
Wes Aday14-Sep-12 5:27
professionalWes Aday14-Sep-12 5:27 
GeneralRe: What Trace??? Pin
alirezamansoori14-Sep-12 7:23
alirezamansoori14-Sep-12 7:23 
GeneralRe: What Trace??? Pin
Wes Aday14-Sep-12 9:09
professionalWes Aday14-Sep-12 9:09 
AnswerRe: What Trace??? Pin
Richard MacCutchan14-Sep-12 5:35
mveRichard MacCutchan14-Sep-12 5:35 
GeneralRe: What Trace??? Pin
alirezamansoori14-Sep-12 7:23
alirezamansoori14-Sep-12 7:23 
GeneralRe: What Trace??? Pin
Richard MacCutchan14-Sep-12 7:31
mveRichard MacCutchan14-Sep-12 7:31 
Questiondifference between these code Pin
yuifox13-Sep-12 23:39
yuifox13-Sep-12 23:39 
AnswerRe: difference between these code PinPopular
Dave Kreskowiak14-Sep-12 4:09
mveDave Kreskowiak14-Sep-12 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.