2015-10-13 119 views
0

我需要能夠最小化啓動命令行應用程序,並讓它在用戶登錄時在Windows 8.1上自動啓動。從Windows 8註冊表中最小化的自動啓動應用程序

以下命令在Windows 8.1中的命令行運行良好:

start /min /D c:\"program files (x86)"\mycompanyname myappname.exe 

但是它未能在HKCU \軟件\微軟\的Windows \ CurrentVersion \ Run中的註冊表的工作。

請幫助

回答

0

選項#1:

cmd.exe /c "start /min /D c:\"program files (x86)"\mycompanyname myappname.exe" 

但是你可能會看到一個黑色的窗口彈出,然後走開。

選項#2:代替更改註冊表,在%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup中創建快捷方式在快捷方式的屬性中,可以指定「最小化」選項。

選項#3:寫一個startMinimized.vbs腳本像這樣的(另):

set objShell = CreateObject("WScript.Shell") 
objShell.Run "c:\program files (x86)\mycompanyname\myappname.exe", 2 
在註冊表

然後

wscript.exe "c:\program files (x86)\mycompanyname\startMinimized.vbs" 
+0

cmd.exe的/ C「開始/分鐘/ dÇ :\「程序文件(x86)」\ mycompanyname myappname.exe「起作用。請注意,「程序文件(x86)」部分只有一組引號。兩套報價不起作用。 – user1475484

+0

好了,更正了。我認爲雙套是必要的,因爲逃跑。 – Soonts

+0

在用戶登錄時自動啓動我的應用程序的最終答案是沒有任何惱人的窗口閃光是從HKCU運行它:software/Microsoft/Windows/CurrentVersion /以wscript.exe運行c:「program files(x86)」\ mycompanyname \ invisible.vbs C:\「program files(x86)」\ mycompanyname \ startup.bat其中invisible.vbs看起來像CreateObject(「Wscript.Shell」)。運行「」「」&WScript.Arguments(0)&「」 「」,0,False – user1475484

相關問題